
1. uri: HTTP, POST '/rest/nc/query/sql4d' 2022-01-28 15:48:42
'POST /rest/nc/query/sql4d HTTP/1.1
Content-Type: application/json
Connection: keep-alive
User-Agent: nc-rest-sql
Authorization: Basic ???
Content-Encoding: lz4
Accept-Encoding: lz4
Content-Length: 1005
Content-Uncompressed-Length: 1613

LZ4. 	28.1.2022 	15:48:42 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	15:48:42 	lx 	(5. Tcp Server 2)

    Connected to: 'Manageri v12 plg4d local, , database: plg4d, user: manage_demo'. 	28.1.2022 	15:48:42 	lx 	(5. Tcp Server 2)

  database connect time: 0.0001 seconds. 	28.1.2022 	15:48:42 	lx 	(5. Tcp Server 2)

* connect: connection changed from 'postgre-demo/fi_demo' to 'plg4d/plg4d'. 	28.1.2022 	15:48:42 	lx 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	15:48:43 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 1. answer time: 00:00:00.00285
  
SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id
 FROM invoice inv
 LEFT OUTER JOIN company co ON co.company_id = inv.company_id
 WHERE inv.company_id IN ('1057')
 ORDER BY inv.invoice_id. 	28.1.2022 	15:48:43 	lx 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	15:48:43 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	15:48:43 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inr.record_id FROM invoice_row inr LEFT OUTER JOIN invoice inv ON inv.invoice_id = inr.invoice_id WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inr.invoice_id, inr.row_number, inr.product_id, pr.transfer_id, inr.explanation, inr.delivered_quantity, inr.price__unit, inr.price_total, inr.vat_price, inr.record_id FROM invoice_row inr  LEFT OUTER JOIN product pr ON pr.product_id = inr.product_id  LEFT OUTER JOIN invoice inv ON inv.invoice_id = inr.invoice_id  WHERE inv.company_id IN ('1057')  ORDER BY inr.invoice_id, inr.row_number  INTO :_lx_atExe1,:_lx_alExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_arExe4,:_lx_atExe5
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/moloni/query-local/order_row-invoice.json. 	28.1.2022 	15:48:45 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT co.record_id FROM company co WHERE co.company_id <> '' INTO :_lx_atExe1
 - original query: SELECT co.company_id, co.project_id, co.name, co.name_2, co.record_id, co.change_id, co.email, co.www, top.net_days, co.telephone_number, co.fax_number, co.info FROM company co  LEFT OUTER JOIN terms_of_payment top ON top.terms_of_payment_id = co.terms_of_payment_id  WHERE co.company_id <> ''  ORDER BY co.company_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_alExe1,:_lx_atExe9,:_lx_atExe10,:_lx_atExe11
 - result _lx_atExe1 size: 159, first value: '0001'
 - query name: new:form/nc/erp-sync/query/company.json. 	28.1.2022 	15:48:51 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT pr.record_id FROM product pr WHERE pr.product_id <> '' INTO :_lx_atExe1
 - original query: SELECT pr.product_id, pr.transfer_id, pr.name, pr.explanation, pr.sales_price__unit, pr.stock_balance__unit, pr.minimum_stock, pr.ean_code, pr.info, pr.record_id FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7
 - result _lx_atExe1 size: 4062, first value: '0002'
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	28.1.2022 	15:49:22 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 -- tcp answer 6, send count: 4, loop count: 3, bytes sent 311849 / 311849, 0 remaining, total send time 241 µs. 	28.1.2022 	15:49:23 	lx 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	15:49:32 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inr.record_id FROM invoice_row inr LEFT OUTER JOIN invoice inv ON inv.invoice_id = inr.invoice_id WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inr.invoice_id, inr.row_number, inr.product_id, pr.transfer_id, inr.explanation, inr.delivered_quantity, inr.price__unit, inr.price_total, inr.vat_price, inr.record_id FROM invoice_row inr  LEFT OUTER JOIN product pr ON pr.product_id = inr.product_id  LEFT OUTER JOIN invoice inv ON inv.invoice_id = inr.invoice_id  WHERE inv.company_id IN ('1057')  ORDER BY inr.invoice_id, inr.row_number  INTO :_lx_atExe1,:_lx_alExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_arExe4,:_lx_atExe5
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/moloni/query-local/order_row-invoice.json. 	28.1.2022 	15:49:34 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inr.record_id FROM invoice_row inr LEFT OUTER JOIN invoice inv ON inv.invoice_id = inr.invoice_id WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inr.invoice_id, inr.row_number, inr.product_id, pr.transfer_id, inr.explanation, inr.delivered_quantity, inr.price__unit, inr.price_total, inr.vat_price, inr.record_id FROM invoice_row inr  LEFT OUTER JOIN product pr ON pr.product_id = inr.product_id  LEFT OUTER JOIN invoice inv ON inv.invoice_id = inr.invoice_id  WHERE inv.company_id IN ('1057')  ORDER BY inr.invoice_id, inr.row_number  INTO :_lx_atExe1,:_lx_alExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_arExe4,:_lx_atExe5
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/moloni/query-local/order_row-invoice.json. 	28.1.2022 	15:49:46 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT co.record_id FROM company co WHERE co.company_id <> '' INTO :_lx_atExe1
 - original query: SELECT co.company_id, co.project_id, co.name, co.name_2, co.record_id, co.change_id, co.email, co.www, top.net_days, co.telephone_number, co.fax_number, co.info FROM company co  LEFT OUTER JOIN terms_of_payment top ON top.terms_of_payment_id = co.terms_of_payment_id  WHERE co.company_id <> ''  ORDER BY co.company_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_alExe1,:_lx_atExe9,:_lx_atExe10,:_lx_atExe11
 - result _lx_atExe1 size: 159, first value: '0001'
 - query name: new:form/nc/erp-sync/query/company.json. 	28.1.2022 	15:50:33 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT pr.record_id FROM product pr WHERE pr.product_id <> '' INTO :_lx_atExe1
 - original query: SELECT pr.product_id, pr.transfer_id, pr.name, pr.explanation, pr.sales_price__unit, pr.stock_balance__unit, pr.minimum_stock, pr.ean_code, pr.info, pr.record_id FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7
 - result _lx_atExe1 size: 4062, first value: '0002'
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	28.1.2022 	15:50:42 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 -- tcp answer 11, send result: -1, send count: 2, loop count: 2, bytes sent 163320 / 311773, 148453 remaining, total send time 3 µs. 	28.1.2022 	15:50:42 	lx 	(5. Tcp Server 2)

 -- tcp answer 11, send count: 4, loop count: 4, bytes sent 311773 / 311773, 0 remaining, total send time 1260 µs. 	28.1.2022 	15:50:42 	lx 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	15:52:49 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	15:52:49 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	15:52:49 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT pr.record_id FROM product pr WHERE pr.product_id <> '' INTO :_lx_atExe1
 - original query: SELECT pr.product_id, pr.transfer_id, pr.name, pr.explanation, pr.sales_price__unit, pr.stock_balance__unit, pr.minimum_stock, pr.ean_code, pr.info, pr.record_id FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7
 - result _lx_atExe1 size: 4062, first value: '0002'
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	28.1.2022 	15:52:52 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 -- tcp answer 15, send count: 4, loop count: 3, bytes sent 311772 / 311772, 0 remaining, total send time 234 µs. 	28.1.2022 	15:52:52 	lx 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	16:05:32 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	16:05:32 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	16:05:32 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT pr.record_id FROM product pr WHERE pr.product_id <> '' INTO :_lx_atExe1
 - original query: SELECT pr.product_id, pr.transfer_id, pr.name, pr.explanation, pr.sales_price__unit, pr.stock_balance__unit, pr.minimum_stock, pr.ean_code, pr.info, pr.record_id FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7
 - result _lx_atExe1 size: 4062, first value: '0002'
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	28.1.2022 	16:05:39 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 -- tcp answer 19, send count: 4, loop count: 3, bytes sent 311801 / 311801, 0 remaining, total send time 25 µs. 	28.1.2022 	16:05:39 	lx 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	16:05:58 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	16:05:58 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	16:05:58 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT pr.record_id FROM product pr WHERE pr.product_id <> '' INTO :_lx_atExe1
 - original query: SELECT pr.product_id, pr.transfer_id, pr.name, pr.explanation, pr.sales_price__unit, pr.stock_balance__unit, pr.minimum_stock, pr.ean_code, pr.info, pr.record_id FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7
 - result _lx_atExe1 size: 4062, first value: '0002'
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	28.1.2022 	16:06:00 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 -- tcp answer 23, send count: 4, loop count: 3, bytes sent 311849 / 311849, 0 remaining, total send time 230 µs. 	28.1.2022 	16:06:00 	lx 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	16:06:15 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	16:06:16 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	16:06:16 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT pr.record_id FROM product pr WHERE pr.product_id <> '' INTO :_lx_atExe1
 - original query: SELECT pr.product_id, pr.transfer_id, pr.name, pr.explanation, pr.sales_price__unit, pr.stock_balance__unit, pr.minimum_stock, pr.ean_code, pr.info, pr.record_id FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7
 - result _lx_atExe1 size: 4062, first value: '0002'
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	28.1.2022 	16:06:18 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 -- tcp answer 27, send count: 4, loop count: 3, bytes sent 311792 / 311792, 0 remaining, total send time 10 µs. 	28.1.2022 	16:06:18 	lx 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	16:07:10 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	16:07:10 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	16:07:10 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT pr.record_id FROM product pr WHERE pr.product_id <> '' INTO :_lx_atExe1
 - original query: SELECT pr.product_id, pr.transfer_id, pr.name, pr.explanation, pr.sales_price__unit, pr.stock_balance__unit, pr.minimum_stock, pr.ean_code, pr.info, pr.record_id FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7
 - result _lx_atExe1 size: 4062, first value: '0002'
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	28.1.2022 	16:07:12 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 -- tcp answer 31, send count: 4, loop count: 3, bytes sent 311754 / 311754, 0 remaining, total send time 244 µs. 	28.1.2022 	16:07:12 	lx 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	16:08:06 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	16:08:07 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	16:08:07 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT pr.record_id FROM product pr WHERE pr.product_id <> '' INTO :_lx_atExe1
 - original query: SELECT pr.product_id, pr.transfer_id, pr.name, pr.explanation, pr.sales_price__unit, pr.stock_balance__unit, pr.minimum_stock, pr.ean_code, pr.info, pr.record_id FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7
 - result _lx_atExe1 size: 4062, first value: '0002'
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	28.1.2022 	16:11:12 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 -- tcp answer 35, send result: -1, send count: 3, loop count: 3, bytes sent 244980 / 311848, 66868 remaining, total send time 5 µs. 	28.1.2022 	16:11:12 	lx 	(5. Tcp Server 2)

 -- tcp answer 35, send count: 4, loop count: 4, bytes sent 311848 / 311848, 0 remaining, total send time 1259 µs. 	28.1.2022 	16:11:12 	lx 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	16:11:18 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	16:11:18 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	16:11:19 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 1 277 bytes ***. 	28.1.2022 	16:11:39 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	16:11:39 	lx 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	16:11:44 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	16:11:44 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	16:11:44 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 1 267 bytes ***. 	28.1.2022 	16:12:22 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	16:12:22 	lx 	(5. Tcp Server 2)

4D: SELECT pr.record_id FROM product pr WHERE pr.product_id <> '' INTO :_lx_atExe1
 - original query: SELECT pr.product_id, pr.transfer_id, pr.name, pr.explanation, pr.sales_price__unit, pr.stock_balance__unit, pr.minimum_stock, pr.ean_code, pr.info, pr.record_id FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7
 - result _lx_atExe1 size: 4062, first value: '0002'
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	28.1.2022 	16:12:46 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 -- tcp answer 42, send result: -1, send count: 3, loop count: 3, bytes sent 244980 / 311792, 66812 remaining, total send time 5 µs. 	28.1.2022 	16:12:47 	lx 	(5. Tcp Server 2)

 -- tcp answer 42, send count: 4, loop count: 4, bytes sent 311792 / 311792, 0 remaining, total send time 1250 µs. 	28.1.2022 	16:12:47 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 1 017 bytes ***. 	28.1.2022 	16:14:06 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	16:14:06 	lx 	(5. Tcp Server 2)

4D: SELECT pr.record_id FROM product pr WHERE pr.product_id <> '' INTO :_lx_atExe1
 - original query: SELECT pr.product_id, pr.transfer_id, pr.name, pr.explanation, pr.sales_price__unit, pr.stock_balance__unit, pr.minimum_stock, pr.ean_code, pr.info, pr.record_id FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7
 - result _lx_atExe1 size: 4062, first value: '0002'
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	28.1.2022 	16:14:11 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 -- tcp answer 43, send count: 4, loop count: 3, bytes sent 311754 / 311754, 0 remaining, total send time 226 µs. 	28.1.2022 	16:14:11 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 1 060 bytes ***. 	28.1.2022 	16:17:28 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	16:17:28 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'nil', reason: 'POLLHUP', request length: (no request) bytes ***. 	28.1.2022 	16:18:06 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	16:18:06 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'nil', reason: 'POLLHUP', request length: (no request) bytes ***. 	28.1.2022 	16:19:00 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	16:19:00 	lx 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	16:22:44 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	16:22:44 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

4D: SELECT inv.record_id FROM invoice inv WHERE inv.company_id IN ('1057') INTO :_lx_atExe1
 - original query: SELECT inv.invoice_id, inv.your_reference, inv.transfer_id, inv.state, inv.company_id, co.transfer_id, inv.date_, inv.due_date, inv.price_total, inv.vat_total, inv.total_amount, inv.currency_id, inv.terms_of_payment_id, inv.invoice_text, inv.type_, inv.record_id FROM invoice inv  LEFT OUTER JOIN company co ON co.company_id = inv.company_id  WHERE inv.company_id IN ('1057')  ORDER BY inv.invoice_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_alExe1,:_lx_atExe4,:_lx_atExe5,:_lx_adExe1,:_lx_adExe2,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe6,:_lx_atExe7,:_lx_atExe8,:_lx_atExe9,:_lx_atExe10
 - result _lx_atExe1 size: 1, first value: 'IN210001'
 - query name: new:form/nc/erp-sync/query/order-invoice.json. 	28.1.2022 	16:22:44 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 1 279 bytes ***. 	28.1.2022 	16:23:43 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	16:23:43 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'nil', reason: 'POLLHUP', request length: (no request) bytes ***. 	28.1.2022 	16:24:23 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	16:24:23 	lx 	(5. Tcp Server 2)

4D: SELECT pr.record_id FROM product pr WHERE pr.product_id <> '' INTO :_lx_atExe1
 - original query: SELECT pr.product_id, pr.transfer_id, pr.name, pr.explanation, pr.sales_price__unit, pr.stock_balance__unit, pr.minimum_stock, pr.ean_code, pr.info, pr.record_id FROM product pr  WHERE pr.product_id <> ''  ORDER BY pr.product_id  INTO :_lx_atExe1,:_lx_atExe2,:_lx_atExe3,:_lx_atExe4,:_lx_arExe1,:_lx_arExe2,:_lx_arExe3,:_lx_atExe5,:_lx_atExe6,:_lx_atExe7
 - result _lx_atExe1 size: 4062, first value: '0002'
 - query name: new:form/nc/erp-sync/moloni/query-local/product-by-order-row.json. 	28.1.2022 	16:24:32 	_lx_ExecuteSqlNew 	(5. Tcp Server 2)

 -- tcp answer 47, send result: -1, send count: 2, loop count: 2, bytes sent 163320 / 311754, 148434 remaining, total send time 2 µs. 	28.1.2022 	16:24:32 	lx 	(5. Tcp Server 2)

 -- tcp answer 47, send result: -1, send count: 3, loop count: 4, bytes sent 244980 / 311754, 66774 remaining, total send time 1252 µs. 	28.1.2022 	16:24:32 	lx 	(5. Tcp Server 2)

 -- tcp answer 47, send count: 4, loop count: 5, bytes sent 311754 / 311754, 0 remaining, total send time 2491 µs. 	28.1.2022 	16:24:32 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 1 048 bytes ***. 	28.1.2022 	16:24:54 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	16:24:54 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 579 bytes ***. 	28.1.2022 	16:27:22 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	16:27:22 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 589 bytes ***. 	28.1.2022 	16:27:45 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	16:27:45 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 3 340 bytes ***. 	28.1.2022 	16:30:38 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	16:30:38 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 3 371 bytes ***. 	28.1.2022 	16:34:55 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	16:34:55 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 3 340 bytes ***. 	28.1.2022 	16:44:05 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	16:44:05 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 2 763 bytes ***. 	28.1.2022 	16:45:37 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	16:45:37 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 2 784 bytes ***. 	28.1.2022 	16:46:54 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	16:46:54 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 578 bytes ***. 	28.1.2022 	16:47:43 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	16:47:43 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 579 bytes ***. 	28.1.2022 	17:06:13 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	17:06:13 	lx 	(5. Tcp Server 2)

Record is not loaded for table: Sales Order Row ([Sales Order Row]Product id). 	28.1.2022 	17:08:40 	_fld VALUE 	(6. tbl_ 5)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 2 770 bytes ***. 	28.1.2022 	17:08:54 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	17:08:54 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 3 352 bytes ***. 	28.1.2022 	17:09:59 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	17:09:59 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 2 789 bytes ***. 	28.1.2022 	17:10:42 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	17:10:42 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 3 326 bytes ***. 	28.1.2022 	17:18:03 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	17:18:03 	lx 	(5. Tcp Server 2)

Record is not loaded for table: Sales Order Row ([Sales Order Row]Product id). 	28.1.2022 	17:48:27 	_fld VALUE 	(6. tbl_ 5)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 2 786 bytes ***. 	28.1.2022 	17:48:31 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	17:48:31 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 599 bytes ***. 	28.1.2022 	17:50:04 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	17:50:04 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 572 bytes ***. 	28.1.2022 	17:50:32 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	17:50:32 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 577 bytes ***. 	28.1.2022 	17:51:15 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	17:51:15 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 579 bytes ***. 	28.1.2022 	17:51:47 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	17:51:47 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 575 bytes ***. 	28.1.2022 	17:55:19 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	17:55:19 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 572 bytes ***. 	28.1.2022 	17:56:51 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	17:56:51 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 672 bytes ***. 	28.1.2022 	17:57:48 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	17:57:48 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 672 bytes ***. 	28.1.2022 	17:59:29 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	17:59:29 	lx 	(5. Tcp Server 2)

Starting to stop tcp server 2, max. delay 1,7 seconds... 	28.1.2022 	17:59:47 	_lx_SERVER 	(6. tbl_ 5)

*** tcp close for sock 72, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	17:59:47 	lx 	(5. Tcp Server 2)

closing socket '72'. 	28.1.2022 	17:59:47 	lx 	(5. Tcp Server 2)

*** tcp close for sock 73, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	17:59:47 	lx 	(5. Tcp Server 2)

closing socket '73'. 	28.1.2022 	17:59:47 	lx 	(5. Tcp Server 2)

 -- Server statistics --
answerCount:          152
poll.fd_count:        0
pollCount:            3696552
pollInCount:          183
pollOutCount:         0
pollCloseCount:       31
pollErrCount:         0
fd add/remove count:  33/33
totalBytesReceived:   150272
totalBytesSent:       1010539. 	28.1.2022 	17:59:47 	lx 	(5. Tcp Server 2)

--- server stopped ---. 	28.1.2022 	17:59:47 	lx 	(5. Tcp Server 2)

finalizer: free p1 	 cdata<void *>: 0x0123df1ef0. 	28.1.2022 	17:59:47 	lx 	(5. Tcp Server 2)

Tcp server 2 stopped. 	28.1.2022 	17:59:47 	_lx_SERVER 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	18:10:22 	lx 	(1. Application process)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/table/db_connection_preference.json'. 	28.1.2022 	18:10:22 	lx 	(1. Application process)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/auth/connection.json'. 	28.1.2022 	18:10:22 	lx 	(1. Application process)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	18:10:22 	lx 	(1. Application process)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	28.1.2022 	18:10:22 	lx 	(1. Application process)

  database connect time: 0.0005 seconds. 	28.1.2022 	18:10:22 	lx 	(1. Application process)

* connect: connection changed to 'postgre-demo/fi_demo'. 	28.1.2022 	18:10:22 	lx 	(1. Application process)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/table/prf/group.json'. 	28.1.2022 	18:10:22 	lx 	(1. Application process)

* preference 'system/nc_server_start.json' was loaded from database 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	28.1.2022 	18:10:22 	lx 	(1. Application process)

Tcp server 2 starting. 	28.1.2022 	18:10:22 	_lx_SERVER 	(5. Tcp Server 2)

Field has not been translated: [Product]Reserved. 	28.1.2022 	18:10:22 	_lang STRUCTURE_TRANSLATE 	(6. tbl_ 5)

Field has not been translated: [Product]Fixed. 	28.1.2022 	18:10:22 	_lang STRUCTURE_TRANSLATE 	(6. tbl_ 5)

Field has not been translated: [Product]Available. 	28.1.2022 	18:10:22 	_lang STRUCTURE_TRANSLATE 	(6. tbl_ 5)

Field has not been translated: [Work_Phase_Actual]Previous_Track_Time. 	28.1.2022 	18:10:22 	_lang STRUCTURE_TRANSLATE 	(6. tbl_ 5)

Field has not been translated: [Work_Order_Schedule]Can_Be_Manufactured. 	28.1.2022 	18:10:22 	_lang STRUCTURE_TRANSLATE 	(6. tbl_ 5)

Field has not been translated: [Work_Order_Schedule]Manufacturing_State. 	28.1.2022 	18:10:22 	_lang STRUCTURE_TRANSLATE 	(6. tbl_ 5)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	18:10:23 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/table/db_connection_preference.json'. 	28.1.2022 	18:10:23 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/auth/connection.json'. 	28.1.2022 	18:10:23 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	18:10:23 	lx 	(5. Tcp Server 2)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	28.1.2022 	18:10:23 	lx 	(5. Tcp Server 2)

  database connect time: 0.0002 seconds. 	28.1.2022 	18:10:23 	lx 	(5. Tcp Server 2)

* connect: connection changed to 'postgre-demo/fi_demo'. 	28.1.2022 	18:10:23 	lx 	(5. Tcp Server 2)

* paths:
 - main: '/Users/pasi/nc/nc-server/'
 - bin : '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/bin/bin_osx_arm64/'
 - pref: '/Users/pasi/nc/nc-server/preference/'
 - 4D  : '/Users/pasi/4D/mg_v19/Manageri_v19/'
. 	28.1.2022 	18:10:23 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/table/prf/group.json'. 	28.1.2022 	18:10:23 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x01219edc10, size: 400. 	28.1.2022 	18:10:23 	lx 	(5. Tcp Server 2)

********************* /Users/pasi/nc/nc-server/ *********************. 	28.1.2022 	18:10:23 	lx 	(5. Tcp Server 2)

port: 5949, arguments: '[
	5949
]', nc-server.json: '[]'. 	28.1.2022 	18:10:23 	lx 	(5. Tcp Server 2)

nc_server: debugLevel(0):0  port(5959):5949  closeConnection(0):0. 	28.1.2022 	18:10:23 	lx 	(5. Tcp Server 2)

1. Loading plugin: nc/worker/auth_worker. 	28.1.2022 	18:10:23 	lx 	(5. Tcp Server 2)

2. Loading plugin: nc/worker/query_worker. 	28.1.2022 	18:10:24 	lx 	(5. Tcp Server 2)

3. Loading plugin: nc/worker/query4d_worker. 	28.1.2022 	18:10:24 	lx 	(5. Tcp Server 2)

4. Loading plugin: nc/worker/call4d_worker. 	28.1.2022 	18:10:24 	lx 	(5. Tcp Server 2)

All plugins have been loaded. 	28.1.2022 	18:10:24 	lx 	(5. Tcp Server 2)

* cached preference files: demo-fi_demo-0 - table/prf/field_type.json, demo-fi_demo-0 - system/option.json, demo-fi_demo-0 - system/4d.json. 	28.1.2022 	18:10:24 	lx 	(5. Tcp Server 2)

* run in command line: 'ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}''. 	28.1.2022 	18:10:24 	lx 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	18:10:24 	lx 	(5. Tcp Server 2)

Mac address: f84d896921dc. 	28.1.2022 	18:10:24 	lx 	(5. Tcp Server 2)

TLS certificate files: /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/cert.pem, /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/privkey.pem. 	28.1.2022 	18:10:24 	lx 	(5. Tcp Server 2)

NC tcp server waiting on:  http://127.0.0.1:5949/,  http://192.168.32.2:5949/
                          https://127.0.0.1:5949/, https://192.168.32.2:5949/. 	28.1.2022 	18:10:24 	lx 	(5. Tcp Server 2)

NC udp server waiting on: 127.0.0.1:5949/, 192.168.32.2:5949/. 	28.1.2022 	18:10:24 	lx 	(5. Tcp Server 2)

--- server started in 0.0044 seconds, 2022-01-28 18:10:24, used memory 3038.7 kb --- 	 5. 	28.1.2022 	18:10:24 	lx 	(5. Tcp Server 2)

OSX arm64, using: rapidjson-arm, lfs-ffi. 	28.1.2022 	18:10:24 	lx 	(5. Tcp Server 2)

1. uri: HTTP, POST '/rest/nc/query/sql4d' 2022-01-28 18:10:30
'POST /rest/nc/query/sql4d HTTP/1.1
Content-Type: application/json
Connection: keep-alive
User-Agent: nc-rest-sql
Authorization: Basic ???
Content-Encoding: lz4
Accept-Encoding: lz4
Content-Length: 426
Content-Uncompressed-Length: 473

LZ4. 	28.1.2022 	18:10:30 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	18:10:30 	lx 	(5. Tcp Server 2)

    Connected to: 'Manageri v12 plg4d local, , database: plg4d, user: manage_demo'. 	28.1.2022 	18:10:30 	lx 	(5. Tcp Server 2)

  database connect time: 0.0001 seconds. 	28.1.2022 	18:10:30 	lx 	(5. Tcp Server 2)

* connect: connection changed from 'postgre-demo/fi_demo' to 'plg4d/plg4d'. 	28.1.2022 	18:10:30 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["local_field"] = {
  [1] = "order_row-sales";
 };
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
 ["field"] = {
  [1] = "order_row-sales";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["query_name"] = "new:";
 ["table_prefix"] = "ordr";
 ["database"] = "plg4d";
};. 	28.1.2022 	18:10:30 	lx 	(5. Tcp Server 2)

 1. answer time: 00:00:00.00108
  
SELECT COUNT(*)
 FROM sales_order_row sor
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'. 	28.1.2022 	18:10:30 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["query_name"] = "new:";
 ["field_type"] = {
  [1] = "integer";
 };
 ["database"] = "plg4d";
};. 	28.1.2022 	18:10:30 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["local_field"] = {
  [1] = "order-sales";
 };
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order so\
 WHERE so.change_id > '20220128.171040.9f00j.so_  zzy0ae544bd03e1d06'";
 ["field"] = {
  [1] = "order-sales";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["query_name"] = "new:";
 ["table_prefix"] = "ord";
 ["database"] = "plg4d";
};. 	28.1.2022 	18:10:30 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order";
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["query_name"] = "new:";
 ["field_type"] = {
  [1] = "integer";
 };
 ["database"] = "plg4d";
};. 	28.1.2022 	18:10:30 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["local_field"] = {
  [1] = "ordr.record_id";
 };
 ["sql"] = "SELECT sor.record_id\
 FROM sales_order_row sor\
 WHERE sor.record_id IS NOT NULL\
 LIMIT 3";
 ["field"] = {
  [1] = "sor.record_id";
 };
 ["field_type"] = {
  [1] = "string";
 };
 ["query_name"] = "new:dsql.sqlExecuteUnsafe";
 ["table_prefix"] = "ordr";
 ["database"] = "plg4d";
};. 	28.1.2022 	18:10:42 	lx 	(5. Tcp Server 2)

*** tcp close for sock 77, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 681 bytes ***. 	28.1.2022 	18:11:43 	lx 	(5. Tcp Server 2)

closing socket '77'. 	28.1.2022 	18:11:43 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["local_field"] = {
  [1] = "order_row-sales";
 };
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
 ["field"] = {
  [1] = "order_row-sales";
 };
 ["table_prefix"] = "ordr";
 ["query_name"] = "new:";
 ["field_type"] = {
  [1] = "integer";
 };
 ["database"] = "plg4d";
};. 	28.1.2022 	18:11:46 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["query_name"] = "new:";
 ["field_type"] = {
  [1] = "integer";
 };
 ["database"] = "plg4d";
};. 	28.1.2022 	18:11:46 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["local_field"] = {
  [1] = "order-sales";
 };
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order so\
 WHERE so.change_id > '20220128.171040.9f00j.so_  zzy0ae544bd03e1d06'";
 ["field"] = {
  [1] = "order-sales";
 };
 ["table_prefix"] = "ord";
 ["query_name"] = "new:";
 ["field_type"] = {
  [1] = "integer";
 };
 ["database"] = "plg4d";
};. 	28.1.2022 	18:11:47 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order";
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["query_name"] = "new:";
 ["field_type"] = {
  [1] = "integer";
 };
 ["database"] = "plg4d";
};. 	28.1.2022 	18:11:47 	lx 	(5. Tcp Server 2)

Starting to stop tcp server 2, max. delay 1,7 seconds... 	28.1.2022 	18:12:02 	_lx_SERVER 	(6. tbl_ 5)

*** tcp close for sock 72, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	18:12:02 	lx 	(5. Tcp Server 2)

closing socket '72'. 	28.1.2022 	18:12:02 	lx 	(5. Tcp Server 2)

*** tcp close for sock 73, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	18:12:02 	lx 	(5. Tcp Server 2)

closing socket '73'. 	28.1.2022 	18:12:02 	lx 	(5. Tcp Server 2)

 -- Server statistics --
answerCount:          9
poll.fd_count:        1
pollCount:            4400
pollInCount:          11
pollOutCount:         0
pollCloseCount:       1
pollErrCount:         0
fd add/remove count:  4/3
totalBytesReceived:   5759
totalBytesSent:       2693. 	28.1.2022 	18:12:02 	lx 	(5. Tcp Server 2)

warning: socket type 'number' is not a table, socket number: 77
. 	28.1.2022 	18:12:02 	lx 	(5. Tcp Server 2)

closing socket '77'. 	28.1.2022 	18:12:02 	lx 	(5. Tcp Server 2)

poll.expand_fds, free old fds: cdata<struct pollfd *>: 0x01219edc10. 	28.1.2022 	18:12:02 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x01219edc10, size: 400. 	28.1.2022 	18:12:02 	lx 	(5. Tcp Server 2)

--- server stopped ---. 	28.1.2022 	18:12:02 	lx 	(5. Tcp Server 2)

finalizer: free p1 	 cdata<void *>: 0x01219edc10. 	28.1.2022 	18:12:02 	lx 	(5. Tcp Server 2)

Tcp server 2 stopped. 	28.1.2022 	18:12:02 	_lx_SERVER 	(5. Tcp Server 2)

Tcp server 2 starting. 	28.1.2022 	18:12:04 	_lx_SERVER 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/table/db_connection_preference.json'. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/auth/connection.json'. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

  database connect time: 0.0002 seconds. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

* connect: connection changed to 'postgre-demo/fi_demo'. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

* paths:
 - main: '/Users/pasi/nc/nc-server/'
 - bin : '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/bin/bin_osx_arm64/'
 - pref: '/Users/pasi/nc/nc-server/preference/'
 - 4D  : '/Users/pasi/4D/mg_v19/Manageri_v19/'
. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/table/prf/group.json'. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0127f2f070, size: 400. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

********************* /Users/pasi/nc/nc-server/ *********************. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

port: 5949, arguments: '[
	5949
]', nc-server.json: '[]'. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

nc_server: debugLevel(0):0  port(5959):5949  closeConnection(0):0. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

1. Loading plugin: nc/worker/auth_worker. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

2. Loading plugin: nc/worker/query_worker. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

3. Loading plugin: nc/worker/query4d_worker. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

4. Loading plugin: nc/worker/call4d_worker. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

All plugins have been loaded. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

* cached preference files: demo-fi_demo-0 - table/prf/field_type.json, demo-fi_demo-0 - system/option.json, demo-fi_demo-0 - system/4d.json. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

* run in command line: 'ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}''. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

Mac address: f84d896921dc. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

TLS certificate files: /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/cert.pem, /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/privkey.pem. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

NC tcp server waiting on:  http://127.0.0.1:5949/,  http://192.168.32.2:5949/
                          https://127.0.0.1:5949/, https://192.168.32.2:5949/. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

NC udp server waiting on: 127.0.0.1:5949/, 192.168.32.2:5949/. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

--- server started in 0.0013 seconds, 2022-01-28 18:12:06, used memory 3115.9 kb --- 	 5. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

OSX arm64, using: rapidjson-arm, lfs-ffi. 	28.1.2022 	18:12:06 	lx 	(5. Tcp Server 2)

1. uri: HTTP, POST '/rest/nc/query/sql4d' 2022-01-28 18:12:10
'POST /rest/nc/query/sql4d HTTP/1.1
Content-Type: application/json
Connection: keep-alive
User-Agent: nc-rest-sql
Authorization: Basic ???
Content-Encoding: lz4
Accept-Encoding: lz4
Content-Length: 421
Content-Uncompressed-Length: 473

LZ4. 	28.1.2022 	18:12:10 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	18:12:10 	lx 	(5. Tcp Server 2)

    Connected to: 'Manageri v12 plg4d local, , database: plg4d, user: manage_demo'. 	28.1.2022 	18:12:10 	lx 	(5. Tcp Server 2)

  database connect time: 0.0001 seconds. 	28.1.2022 	18:12:10 	lx 	(5. Tcp Server 2)

* connect: connection changed from 'postgre-demo/fi_demo' to 'plg4d/plg4d'. 	28.1.2022 	18:12:10 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "order_row-sales";
 };
 ["database"] = "plg4d";
 ["query_name"] = "new:";
 ["field_type"] = {
  [1] = "integer";
 };
 ["table_prefix"] = "ordr";
 ["local_field"] = {
  [1] = "order_row-sales";
 };
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
};. 	28.1.2022 	18:12:10 	lx 	(5. Tcp Server 2)

 1. answer time: 00:00:00.00072
  
SELECT COUNT(*)
 FROM sales_order_row sor
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'. 	28.1.2022 	18:12:10 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["database"] = "plg4d";
 ["query_name"] = "new:";
 ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
 ["field_type"] = {
  [1] = "integer";
 };
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
};. 	28.1.2022 	18:12:11 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "order-sales";
 };
 ["database"] = "plg4d";
 ["query_name"] = "new:";
 ["field_type"] = {
  [1] = "integer";
 };
 ["table_prefix"] = "ord";
 ["local_field"] = {
  [1] = "order-sales";
 };
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order so\
 WHERE so.change_id > '20220128.171040.9f00j.so_  zzy0ae544bd03e1d06'";
};. 	28.1.2022 	18:12:11 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["database"] = "plg4d";
 ["query_name"] = "new:";
 ["sql"] = "SELECT COUNT(*) FROM sales_order";
 ["field_type"] = {
  [1] = "integer";
 };
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
};. 	28.1.2022 	18:12:11 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "sor.record_id";
 };
 ["database"] = "plg4d";
 ["query_name"] = "new:dsql.sqlExecuteUnsafe";
 ["field_type"] = {
  [1] = "string";
 };
 ["table_prefix"] = "ordr";
 ["local_field"] = {
  [1] = "ordr.record_id";
 };
 ["sql"] = "SELECT sor.record_id\
 FROM sales_order_row sor\
 WHERE sor.record_id IS NOT NULL\
 LIMIT 3";
};. 	28.1.2022 	18:12:13 	lx 	(5. Tcp Server 2)

Starting to stop tcp server 2, max. delay 1,7 seconds... 	28.1.2022 	18:12:37 	_lx_SERVER 	(6. tbl_ 5)

*** tcp close for sock 73, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	18:12:37 	lx 	(5. Tcp Server 2)

closing socket '73'. 	28.1.2022 	18:12:37 	lx 	(5. Tcp Server 2)

*** tcp close for sock 77, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	18:12:37 	lx 	(5. Tcp Server 2)

closing socket '77'. 	28.1.2022 	18:12:37 	lx 	(5. Tcp Server 2)

 -- Server statistics --
answerCount:          5
poll.fd_count:        1
pollCount:            1376
pollInCount:          6
pollOutCount:         0
pollCloseCount:       0
pollErrCount:         0
fd add/remove count:  3/2
totalBytesReceived:   3222
totalBytesSent:       1572. 	28.1.2022 	18:12:37 	lx 	(5. Tcp Server 2)

warning: socket type 'number' is not a table, socket number: 78
. 	28.1.2022 	18:12:37 	lx 	(5. Tcp Server 2)

closing socket '78'. 	28.1.2022 	18:12:37 	lx 	(5. Tcp Server 2)

poll.expand_fds, free old fds: cdata<struct pollfd *>: 0x0127f2f070. 	28.1.2022 	18:12:37 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0127f2f070, size: 400. 	28.1.2022 	18:12:37 	lx 	(5. Tcp Server 2)

--- server stopped ---. 	28.1.2022 	18:12:37 	lx 	(5. Tcp Server 2)

finalizer: free p1 	 cdata<void *>: 0x0127f2f070. 	28.1.2022 	18:12:37 	lx 	(5. Tcp Server 2)

Tcp server 2 stopped. 	28.1.2022 	18:12:37 	_lx_SERVER 	(5. Tcp Server 2)

Tcp server 2 is not running. 	28.1.2022 	18:13:02 	_lx_SERVER 	(6. tbl_ 5)

Tcp server 2 starting. 	28.1.2022 	18:13:05 	_lx_SERVER 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	18:13:06 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/table/db_connection_preference.json'. 	28.1.2022 	18:13:06 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/auth/connection.json'. 	28.1.2022 	18:13:06 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	18:13:06 	lx 	(5. Tcp Server 2)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	28.1.2022 	18:13:06 	lx 	(5. Tcp Server 2)

  database connect time: 0.0003 seconds. 	28.1.2022 	18:13:06 	lx 	(5. Tcp Server 2)

* connect: connection changed to 'postgre-demo/fi_demo'. 	28.1.2022 	18:13:06 	lx 	(5. Tcp Server 2)

* paths:
 - main: '/Users/pasi/nc/nc-server/'
 - bin : '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/bin/bin_osx_arm64/'
 - pref: '/Users/pasi/nc/nc-server/preference/'
 - 4D  : '/Users/pasi/4D/mg_v19/Manageri_v19/'
. 	28.1.2022 	18:13:06 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/table/prf/group.json'. 	28.1.2022 	18:13:06 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0122eba260, size: 400. 	28.1.2022 	18:13:06 	lx 	(5. Tcp Server 2)

********************* /Users/pasi/nc/nc-server/ *********************. 	28.1.2022 	18:13:06 	lx 	(5. Tcp Server 2)

port: 5949, arguments: '[
	5949
]', nc-server.json: '[]'. 	28.1.2022 	18:13:06 	lx 	(5. Tcp Server 2)

nc_server: debugLevel(0):0  port(5959):5949  closeConnection(0):0. 	28.1.2022 	18:13:06 	lx 	(5. Tcp Server 2)

1. Loading plugin: nc/worker/auth_worker. 	28.1.2022 	18:13:06 	lx 	(5. Tcp Server 2)

2. Loading plugin: nc/worker/query_worker. 	28.1.2022 	18:13:06 	lx 	(5. Tcp Server 2)

3. Loading plugin: nc/worker/query4d_worker. 	28.1.2022 	18:13:06 	lx 	(5. Tcp Server 2)

4. Loading plugin: nc/worker/call4d_worker. 	28.1.2022 	18:13:06 	lx 	(5. Tcp Server 2)

All plugins have been loaded. 	28.1.2022 	18:13:06 	lx 	(5. Tcp Server 2)

* cached preference files: demo-fi_demo-0 - system/option.json, demo-fi_demo-0 - system/4d.json, demo-fi_demo-0 - table/prf/field_type.json. 	28.1.2022 	18:13:07 	lx 	(5. Tcp Server 2)

* run in command line: 'ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}''. 	28.1.2022 	18:13:07 	lx 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	18:13:07 	lx 	(5. Tcp Server 2)

Mac address: f84d896921dc. 	28.1.2022 	18:13:07 	lx 	(5. Tcp Server 2)

TLS certificate files: /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/cert.pem, /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/privkey.pem. 	28.1.2022 	18:13:07 	lx 	(5. Tcp Server 2)

NC tcp server waiting on:  http://127.0.0.1:5949/,  http://192.168.32.2:5949/
                          https://127.0.0.1:5949/, https://192.168.32.2:5949/. 	28.1.2022 	18:13:07 	lx 	(5. Tcp Server 2)

NC udp server waiting on: 127.0.0.1:5949/, 192.168.32.2:5949/. 	28.1.2022 	18:13:07 	lx 	(5. Tcp Server 2)

--- server started in 0.0018 seconds, 2022-01-28 18:13:07, used memory 3031.3 kb --- 	 5. 	28.1.2022 	18:13:07 	lx 	(5. Tcp Server 2)

OSX arm64, using: rapidjson-arm, lfs-ffi. 	28.1.2022 	18:13:07 	lx 	(5. Tcp Server 2)

1. uri: HTTP, POST '/rest/nc/query/sql4d' 2022-01-28 18:13:10
'POST /rest/nc/query/sql4d HTTP/1.1
Content-Type: application/json
Connection: keep-alive
User-Agent: nc-rest-sql
Authorization: Basic ???
Content-Encoding: lz4
Accept-Encoding: lz4
Content-Length: 416
Content-Uncompressed-Length: 473

LZ4. 	28.1.2022 	18:13:10 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	18:13:10 	lx 	(5. Tcp Server 2)

    Connected to: 'Manageri v12 plg4d local, , database: plg4d, user: manage_demo'. 	28.1.2022 	18:13:10 	lx 	(5. Tcp Server 2)

  database connect time: 0.0001 seconds. 	28.1.2022 	18:13:10 	lx 	(5. Tcp Server 2)

* connect: connection changed from 'postgre-demo/fi_demo' to 'plg4d/plg4d'. 	28.1.2022 	18:13:10 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "order_row-sales";
 };
 ["query_name"] = "new:";
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
 ["field_type"] = {
  [1] = "integer";
 };
 ["table_prefix"] = "ordr";
 ["local_field"] = {
  [1] = "order_row-sales";
 };
 ["database"] = "plg4d";
};. 	28.1.2022 	18:13:10 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:13:10 	lx 	(5. Tcp Server 2)

 1. answer time: 00:00:00.00090
  
SELECT COUNT(*)
 FROM sales_order_row sor
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'. 	28.1.2022 	18:13:10 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["query_name"] = "new:";
 ["database"] = "plg4d";
 ["field_type"] = {
  [1] = "integer";
 };
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
};. 	28.1.2022 	18:13:10 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:13:10 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "order-sales";
 };
 ["query_name"] = "new:";
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order so\
 WHERE so.change_id > '20220128.171040.9f00j.so_  zzy0ae544bd03e1d06'";
 ["field_type"] = {
  [1] = "integer";
 };
 ["table_prefix"] = "ord";
 ["local_field"] = {
  [1] = "order-sales";
 };
 ["database"] = "plg4d";
};. 	28.1.2022 	18:13:10 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:13:10 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["query_name"] = "new:";
 ["database"] = "plg4d";
 ["field_type"] = {
  [1] = "integer";
 };
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order";
};. 	28.1.2022 	18:13:11 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:13:11 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "sor.record_id";
 };
 ["query_name"] = "new:dsql.sqlExecuteUnsafe";
 ["sql"] = "SELECT sor.record_id\
 FROM sales_order_row sor\
 WHERE sor.record_id IS NOT NULL\
 LIMIT 3";
 ["field_type"] = {
  [1] = "string";
 };
 ["table_prefix"] = "ordr";
 ["local_field"] = {
  [1] = "ordr.record_id";
 };
 ["database"] = "plg4d";
};. 	28.1.2022 	18:13:23 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:13:23 	lx 	(5. Tcp Server 2)

*** tcp close for sock 79, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 671 bytes ***. 	28.1.2022 	18:13:33 	lx 	(5. Tcp Server 2)

closing socket '79'. 	28.1.2022 	18:13:33 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "order_row-sales";
 };
 ["query_name"] = "new:";
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
 ["field_type"] = {
  [1] = "integer";
 };
 ["local_field"] = {
  [1] = "order_row-sales";
 };
 ["table_prefix"] = "ordr";
 ["database"] = "plg4d";
};. 	28.1.2022 	18:13:38 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:13:38 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["query_name"] = "new:";
 ["database"] = "plg4d";
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
};. 	28.1.2022 	18:13:39 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:13:39 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "order-sales";
 };
 ["query_name"] = "new:";
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order so\
 WHERE so.change_id > '20220128.171040.9f00j.so_  zzy0ae544bd03e1d06'";
 ["field_type"] = {
  [1] = "integer";
 };
 ["local_field"] = {
  [1] = "order-sales";
 };
 ["table_prefix"] = "ord";
 ["database"] = "plg4d";
};. 	28.1.2022 	18:13:39 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:13:39 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["query_name"] = "new:";
 ["database"] = "plg4d";
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order";
};. 	28.1.2022 	18:13:39 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:13:39 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "sor.record_id";
 };
 ["query_name"] = "new:dsql.sqlExecuteUnsafe";
 ["sql"] = "SELECT sor.record_id\
 FROM sales_order_row sor\
 WHERE sor.record_id IS NOT NULL\
 LIMIT 3";
 ["field_type"] = {
  [1] = "string";
 };
 ["local_field"] = {
  [1] = "ordr.record_id";
 };
 ["table_prefix"] = "ordr";
 ["database"] = "plg4d";
};. 	28.1.2022 	18:13:56 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:13:56 	lx 	(5. Tcp Server 2)

*** tcp close for sock 79, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 669 bytes ***. 	28.1.2022 	18:14:01 	lx 	(5. Tcp Server 2)

closing socket '79'. 	28.1.2022 	18:14:01 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "order_row-sales";
 };
 ["query_name"] = "new:";
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
 ["field_type"] = {
  [1] = "integer";
 };
 ["local_field"] = {
  [1] = "order_row-sales";
 };
 ["table_prefix"] = "ordr";
 ["database"] = "plg4d";
};. 	28.1.2022 	18:14:03 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:14:03 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["query_name"] = "new:";
 ["database"] = "plg4d";
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
};. 	28.1.2022 	18:14:03 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:14:03 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "order-sales";
 };
 ["query_name"] = "new:";
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order so\
 WHERE so.change_id > '20220128.171040.9f00j.so_  zzy0ae544bd03e1d06'";
 ["field_type"] = {
  [1] = "integer";
 };
 ["local_field"] = {
  [1] = "order-sales";
 };
 ["table_prefix"] = "ord";
 ["database"] = "plg4d";
};. 	28.1.2022 	18:14:03 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:14:03 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["query_name"] = "new:";
 ["database"] = "plg4d";
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order";
};. 	28.1.2022 	18:14:03 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:14:03 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "sor.record_id";
 };
 ["query_name"] = "new:dsql.sqlExecuteUnsafe";
 ["sql"] = "SELECT sor.record_id\
 FROM sales_order_row sor\
 WHERE sor.record_id IS NOT NULL\
 LIMIT 3";
 ["field_type"] = {
  [1] = "string";
 };
 ["local_field"] = {
  [1] = "ordr.record_id";
 };
 ["table_prefix"] = "ordr";
 ["database"] = "plg4d";
};. 	28.1.2022 	18:14:05 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:14:05 	lx 	(5. Tcp Server 2)

*** tcp close for sock 79, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 679 bytes ***. 	28.1.2022 	18:14:07 	lx 	(5. Tcp Server 2)

closing socket '79'. 	28.1.2022 	18:14:07 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "order_row-sales";
 };
 ["query_name"] = "new:";
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
 ["table_prefix"] = "ordr";
 ["field_type"] = {
  [1] = "integer";
 };
 ["local_field"] = {
  [1] = "order_row-sales";
 };
 ["database"] = "plg4d";
};. 	28.1.2022 	18:14:09 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:14:09 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["query_name"] = "new:";
 ["database"] = "plg4d";
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
};. 	28.1.2022 	18:14:09 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:14:09 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "order-sales";
 };
 ["query_name"] = "new:";
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order so\
 WHERE so.change_id > '20220128.171040.9f00j.so_  zzy0ae544bd03e1d06'";
 ["table_prefix"] = "ord";
 ["field_type"] = {
  [1] = "integer";
 };
 ["local_field"] = {
  [1] = "order-sales";
 };
 ["database"] = "plg4d";
};. 	28.1.2022 	18:14:09 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:14:09 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["query_name"] = "new:";
 ["database"] = "plg4d";
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order";
};. 	28.1.2022 	18:14:10 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:14:10 	lx 	(5. Tcp Server 2)

*** tcp close for sock 79, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 587 bytes ***. 	28.1.2022 	18:18:30 	lx 	(5. Tcp Server 2)

closing socket '79'. 	28.1.2022 	18:18:30 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "order_row-sales";
 };
 ["query_name"] = "new:";
 ["local_field"] = {
  [1] = "order_row-sales";
 };
 ["database"] = "plg4d";
 ["return_type"] = "record array";
 ["field_type"] = {
  [1] = "integer";
 };
 ["table_prefix"] = "ordr";
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
};. 	28.1.2022 	18:18:45 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:18:45 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["return_type"] = "record array";
 ["query_name"] = "new:";
 ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["database"] = "plg4d";
};. 	28.1.2022 	18:20:02 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:20:02 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "order-sales";
 };
 ["query_name"] = "new:";
 ["local_field"] = {
  [1] = "order-sales";
 };
 ["database"] = "plg4d";
 ["return_type"] = "record array";
 ["field_type"] = {
  [1] = "integer";
 };
 ["table_prefix"] = "ord";
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order so\
 WHERE so.change_id > '20220128.171040.9f00j.so_  zzy0ae544bd03e1d06'";
};. 	28.1.2022 	18:20:20 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:20:20 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["return_type"] = "record array";
 ["query_name"] = "new:";
 ["sql"] = "SELECT COUNT(*) FROM sales_order";
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["database"] = "plg4d";
};. 	28.1.2022 	18:20:21 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:20:21 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "sor.record_id";
 };
 ["query_name"] = "new:dsql.sqlExecuteUnsafe";
 ["local_field"] = {
  [1] = "ordr.record_id";
 };
 ["database"] = "plg4d";
 ["return_type"] = "array table";
 ["field_type"] = {
  [1] = "string";
 };
 ["table_prefix"] = "ordr";
 ["sql"] = "SELECT sor.record_id\
 FROM sales_order_row sor\
 WHERE sor.record_id IS NOT NULL\
 LIMIT 3";
};. 	28.1.2022 	18:20:26 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:20:26 	lx 	(5. Tcp Server 2)

*** tcp close for sock 79, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 701 bytes ***. 	28.1.2022 	18:20:35 	lx 	(5. Tcp Server 2)

closing socket '79'. 	28.1.2022 	18:20:35 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "order_row-sales";
 };
 ["query_name"] = "new:";
 ["local_field"] = {
  [1] = "order_row-sales";
 };
 ["database"] = "plg4d";
 ["return_type"] = "record array";
 ["field_type"] = {
  [1] = "integer";
 };
 ["table_prefix"] = "ordr";
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
};. 	28.1.2022 	18:26:50 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:26:50 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["return_type"] = "record array";
 ["query_name"] = "new:";
 ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["database"] = "plg4d";
};. 	28.1.2022 	18:26:50 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:26:50 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "order-sales";
 };
 ["query_name"] = "new:";
 ["local_field"] = {
  [1] = "order-sales";
 };
 ["database"] = "plg4d";
 ["return_type"] = "record array";
 ["field_type"] = {
  [1] = "integer";
 };
 ["table_prefix"] = "ord";
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order so\
 WHERE so.change_id > '20220128.171040.9f00j.so_  zzy0ae544bd03e1d06'";
};. 	28.1.2022 	18:26:51 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:26:51 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["return_type"] = "record array";
 ["query_name"] = "new:";
 ["sql"] = "SELECT COUNT(*) FROM sales_order";
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["database"] = "plg4d";
};. 	28.1.2022 	18:26:51 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:26:51 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "sor.record_id";
 };
 ["query_name"] = "new:dsql.sqlExecuteUnsafe";
 ["local_field"] = {
  [1] = "ordr.record_id";
 };
 ["database"] = "plg4d";
 ["return_type"] = "array table";
 ["field_type"] = {
  [1] = "string";
 };
 ["table_prefix"] = "ordr";
 ["sql"] = "SELECT sor.record_id\
 FROM sales_order_row sor\
 WHERE sor.record_id IS NOT NULL\
 LIMIT 3";
};. 	28.1.2022 	18:26:53 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:26:53 	lx 	(5. Tcp Server 2)

Starting to stop tcp server 2, max. delay 1,7 seconds... 	28.1.2022 	18:27:50 	_lx_SERVER 	(6. tbl_ 5)

*** tcp close for sock 77, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	18:27:50 	lx 	(5. Tcp Server 2)

closing socket '77'. 	28.1.2022 	18:27:50 	lx 	(5. Tcp Server 2)

*** tcp close for sock 78, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	18:27:50 	lx 	(5. Tcp Server 2)

closing socket '78'. 	28.1.2022 	18:27:50 	lx 	(5. Tcp Server 2)

 -- Server statistics --
answerCount:          29
poll.fd_count:        1
pollCount:            39544
pollInCount:          35
pollOutCount:         0
pollCloseCount:       5
pollErrCount:         0
fd add/remove count:  8/7
totalBytesReceived:   18802
totalBytesSent:       8982. 	28.1.2022 	18:27:50 	lx 	(5. Tcp Server 2)

warning: socket type 'number' is not a table, socket number: 79
. 	28.1.2022 	18:27:50 	lx 	(5. Tcp Server 2)

closing socket '79'. 	28.1.2022 	18:27:50 	lx 	(5. Tcp Server 2)

poll.expand_fds, free old fds: cdata<struct pollfd *>: 0x0122eba260. 	28.1.2022 	18:27:50 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0122eba260, size: 400. 	28.1.2022 	18:27:50 	lx 	(5. Tcp Server 2)

--- server stopped ---. 	28.1.2022 	18:27:50 	lx 	(5. Tcp Server 2)

finalizer: free p1 	 cdata<void *>: 0x0122eba260. 	28.1.2022 	18:27:50 	lx 	(5. Tcp Server 2)

Tcp server 2 stopped. 	28.1.2022 	18:27:50 	_lx_SERVER 	(5. Tcp Server 2)

Tcp server 2 starting. 	28.1.2022 	18:27:53 	_lx_SERVER 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/table/db_connection_preference.json'. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/auth/connection.json'. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

  database connect time: 0.0003 seconds. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

* connect: connection changed to 'postgre-demo/fi_demo'. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

* paths:
 - main: '/Users/pasi/nc/nc-server/'
 - bin : '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/bin/bin_osx_arm64/'
 - pref: '/Users/pasi/nc/nc-server/preference/'
 - 4D  : '/Users/pasi/4D/mg_v19/Manageri_v19/'
. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/table/prf/group.json'. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0134631d60, size: 400. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

********************* /Users/pasi/nc/nc-server/ *********************. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

port: 5949, arguments: '[
	5949
]', nc-server.json: '[]'. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

nc_server: debugLevel(0):0  port(5959):5949  closeConnection(0):0. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

1. Loading plugin: nc/worker/auth_worker. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

2. Loading plugin: nc/worker/query_worker. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

3. Loading plugin: nc/worker/query4d_worker. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

4. Loading plugin: nc/worker/call4d_worker. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

All plugins have been loaded. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

* cached preference files: demo-fi_demo-0 - system/option.json, demo-fi_demo-0 - table/prf/field_type.json, demo-fi_demo-0 - system/4d.json. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

* run in command line: 'ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}''. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

Mac address: f84d896921dc. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

TLS certificate files: /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/cert.pem, /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/privkey.pem. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

NC tcp server waiting on:  http://127.0.0.1:5949/,  http://192.168.32.2:5949/
                          https://127.0.0.1:5949/, https://192.168.32.2:5949/. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

NC udp server waiting on: 127.0.0.1:5949/, 192.168.32.2:5949/. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

--- server started in 0.0015 seconds, 2022-01-28 18:27:54, used memory 3031.8 kb --- 	 5. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

OSX arm64, using: rapidjson-arm, lfs-ffi. 	28.1.2022 	18:27:54 	lx 	(5. Tcp Server 2)

1. uri: HTTP, POST '/rest/nc/query/sql4d' 2022-01-28 18:27:59
'POST /rest/nc/query/sql4d HTTP/1.1
Content-Type: application/json
Connection: keep-alive
User-Agent: nc-rest-sql
Authorization: Basic ???
Content-Encoding: lz4
Accept-Encoding: lz4
Content-Length: 452
Content-Uncompressed-Length: 502

LZ4. 	28.1.2022 	18:27:59 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	18:27:59 	lx 	(5. Tcp Server 2)

    Connected to: 'Manageri v12 plg4d local, , database: plg4d, user: manage_demo'. 	28.1.2022 	18:27:59 	lx 	(5. Tcp Server 2)

  database connect time: 0.0001 seconds. 	28.1.2022 	18:27:59 	lx 	(5. Tcp Server 2)

* connect: connection changed from 'postgre-demo/fi_demo' to 'plg4d/plg4d'. 	28.1.2022 	18:27:59 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 722 bytes ***. 	28.1.2022 	18:28:10 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	18:28:10 	lx 	(5. Tcp Server 2)

Starting to stop tcp server 2, max. delay 1,7 seconds... 	28.1.2022 	18:28:54 	_lx_SERVER 	(6. tbl_ 5)

*** tcp close for sock 78, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	18:28:54 	lx 	(5. Tcp Server 2)

closing socket '78'. 	28.1.2022 	18:28:54 	lx 	(5. Tcp Server 2)

*** tcp close for sock 79, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	18:28:54 	lx 	(5. Tcp Server 2)

closing socket '79'. 	28.1.2022 	18:28:54 	lx 	(5. Tcp Server 2)

 -- Server statistics --
answerCount:          1
poll.fd_count:        0
pollCount:            2657
pollInCount:          1
pollOutCount:         0
pollCloseCount:       1
pollErrCount:         0
fd add/remove count:  3/3
totalBytesReceived:   722
totalBytesSent:       0. 	28.1.2022 	18:28:54 	lx 	(5. Tcp Server 2)

--- server stopped ---. 	28.1.2022 	18:28:54 	lx 	(5. Tcp Server 2)

finalizer: free p1 	 cdata<void *>: 0x0134631d60. 	28.1.2022 	18:28:55 	lx 	(5. Tcp Server 2)

Tcp server 2 stopped. 	28.1.2022 	18:28:55 	_lx_SERVER 	(5. Tcp Server 2)

Tcp server 2 starting. 	28.1.2022 	18:29:00 	_lx_SERVER 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/table/db_connection_preference.json'. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/auth/connection.json'. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

  database connect time: 0.0003 seconds. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

* connect: connection changed to 'postgre-demo/fi_demo'. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

* paths:
 - main: '/Users/pasi/nc/nc-server/'
 - bin : '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/bin/bin_osx_arm64/'
 - pref: '/Users/pasi/nc/nc-server/preference/'
 - 4D  : '/Users/pasi/4D/mg_v19/Manageri_v19/'
. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/table/prf/group.json'. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0122efd410, size: 400. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

********************* /Users/pasi/nc/nc-server/ *********************. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

port: 5949, arguments: '[
	5949
]', nc-server.json: '[]'. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

nc_server: debugLevel(0):0  port(5959):5949  closeConnection(0):0. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

1. Loading plugin: nc/worker/auth_worker. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

2. Loading plugin: nc/worker/query_worker. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

3. Loading plugin: nc/worker/query4d_worker. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

4. Loading plugin: nc/worker/call4d_worker. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

All plugins have been loaded. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

* cached preference files: demo-fi_demo-0 - system/4d.json, demo-fi_demo-0 - table/prf/field_type.json, demo-fi_demo-0 - system/option.json. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

* run in command line: 'ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}''. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

Mac address: f84d896921dc. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

TLS certificate files: /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/cert.pem, /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/privkey.pem. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

NC tcp server waiting on:  http://127.0.0.1:5949/,  http://192.168.32.2:5949/
                          https://127.0.0.1:5949/, https://192.168.32.2:5949/. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

NC udp server waiting on: 127.0.0.1:5949/, 192.168.32.2:5949/. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

--- server started in 0.0018 seconds, 2022-01-28 18:29:01, used memory 3004.7 kb --- 	 5. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

OSX arm64, using: rapidjson-arm, lfs-ffi. 	28.1.2022 	18:29:01 	lx 	(5. Tcp Server 2)

1. uri: HTTP, POST '/rest/nc/query/sql4d' 2022-01-28 18:29:06
'POST /rest/nc/query/sql4d HTTP/1.1
Content-Type: application/json
Connection: keep-alive
User-Agent: nc-rest-sql
Authorization: Basic ???
Content-Encoding: lz4
Accept-Encoding: lz4
Content-Length: 448
Content-Uncompressed-Length: 502

LZ4. 	28.1.2022 	18:29:06 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	18:29:06 	lx 	(5. Tcp Server 2)

    Connected to: 'Manageri v12 plg4d local, , database: plg4d, user: manage_demo'. 	28.1.2022 	18:29:06 	lx 	(5. Tcp Server 2)

  database connect time: 0.0002 seconds. 	28.1.2022 	18:29:06 	lx 	(5. Tcp Server 2)

* connect: connection changed from 'postgre-demo/fi_demo' to 'plg4d/plg4d'. 	28.1.2022 	18:29:06 	lx 	(5. Tcp Server 2)

*** tcp close for sock 81, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 718 bytes ***. 	28.1.2022 	18:29:26 	lx 	(5. Tcp Server 2)

closing socket '81'. 	28.1.2022 	18:29:26 	lx 	(5. Tcp Server 2)

Starting to stop tcp server 2, max. delay 1,7 seconds... 	28.1.2022 	18:30:13 	_lx_SERVER 	(6. tbl_ 5)

*** tcp close for sock 79, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	18:30:13 	lx 	(5. Tcp Server 2)

closing socket '79'. 	28.1.2022 	18:30:13 	lx 	(5. Tcp Server 2)

*** tcp close for sock 80, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	18:30:13 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	18:30:13 	lx 	(5. Tcp Server 2)

 -- Server statistics --
answerCount:          1
poll.fd_count:        0
pollCount:            3193
pollInCount:          1
pollOutCount:         0
pollCloseCount:       1
pollErrCount:         0
fd add/remove count:  3/3
totalBytesReceived:   718
totalBytesSent:       0. 	28.1.2022 	18:30:13 	lx 	(5. Tcp Server 2)

--- server stopped ---. 	28.1.2022 	18:30:13 	lx 	(5. Tcp Server 2)

finalizer: free p1 	 cdata<void *>: 0x0122efd410. 	28.1.2022 	18:30:13 	lx 	(5. Tcp Server 2)

Tcp server 2 stopped. 	28.1.2022 	18:30:13 	_lx_SERVER 	(5. Tcp Server 2)

Tcp server 2 starting. 	28.1.2022 	18:30:17 	_lx_SERVER 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/table/db_connection_preference.json'. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/auth/connection.json'. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

  database connect time: 0.0003 seconds. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

* connect: connection changed to 'postgre-demo/fi_demo'. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

* paths:
 - main: '/Users/pasi/nc/nc-server/'
 - bin : '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/bin/bin_osx_arm64/'
 - pref: '/Users/pasi/nc/nc-server/preference/'
 - 4D  : '/Users/pasi/4D/mg_v19/Manageri_v19/'
. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/table/prf/group.json'. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x01219d2f00, size: 400. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

********************* /Users/pasi/nc/nc-server/ *********************. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

port: 5949, arguments: '[
	5949
]', nc-server.json: '[]'. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

nc_server: debugLevel(0):0  port(5959):5949  closeConnection(0):0. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

1. Loading plugin: nc/worker/auth_worker. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

2. Loading plugin: nc/worker/query_worker. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

3. Loading plugin: nc/worker/query4d_worker. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

4. Loading plugin: nc/worker/call4d_worker. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

All plugins have been loaded. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

* cached preference files: demo-fi_demo-0 - table/prf/field_type.json, demo-fi_demo-0 - system/option.json, demo-fi_demo-0 - system/4d.json. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

* run in command line: 'ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}''. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

Mac address: f84d896921dc. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

TLS certificate files: /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/cert.pem, /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/privkey.pem. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

NC tcp server waiting on:  http://127.0.0.1:5949/,  http://192.168.32.2:5949/
                          https://127.0.0.1:5949/, https://192.168.32.2:5949/. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

NC udp server waiting on: 127.0.0.1:5949/, 192.168.32.2:5949/. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

--- server started in 0.0022 seconds, 2022-01-28 18:30:19, used memory 3004.8 kb --- 	 5. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

OSX arm64, using: rapidjson-arm, lfs-ffi. 	28.1.2022 	18:30:19 	lx 	(5. Tcp Server 2)

1. uri: HTTP, POST '/rest/nc/query/sql4d' 2022-01-28 18:30:25
'POST /rest/nc/query/sql4d HTTP/1.1
Content-Type: application/json
Connection: keep-alive
User-Agent: nc-rest-sql
Authorization: Basic ???
Content-Encoding: lz4
Accept-Encoding: lz4
Content-Length: 435
Content-Uncompressed-Length: 502

LZ4. 	28.1.2022 	18:30:25 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	18:30:25 	lx 	(5. Tcp Server 2)

    Connected to: 'Manageri v12 plg4d local, , database: plg4d, user: manage_demo'. 	28.1.2022 	18:30:25 	lx 	(5. Tcp Server 2)

  database connect time: 0.0003 seconds. 	28.1.2022 	18:30:25 	lx 	(5. Tcp Server 2)

* connect: connection changed from 'postgre-demo/fi_demo' to 'plg4d/plg4d'. 	28.1.2022 	18:30:25 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 [1] = "integer";
 ["database"] = "plg4d";
 ["field_type"] = {
  ["return_type"] = "record array";
  ["field_type"] = {}; -- option - plg4d selectionToArrayTable (self reference)
  ["local_field"] = {
   [1] = "order_row-sales";
  };
  ["field"] = {
   [1] = "order_row-sales";
  };
  ["query_name"] = "new:";
  ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
  ["table_prefix"] = "ordr";
 };
 ["query_name"] = "dsql.sqlExecuteUnsafe";
};option - plg4d selectionToArrayTable["field_type"]["field_type"] = option - plg4d selectionToArrayTable;
. 	28.1.2022 	18:30:25 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:30:25 	lx 	(5. Tcp Server 2)

error: field type 'nil' is not supported, sql:
 SELECT COUNT(*)
 FROM sales_order_row sor
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'
  [stack traceback:
	/Users/pasi/nc/nc-server/lib/util.lua:572: in function 'printError'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:796: in function 'executeSql'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:846: in function 'selectionToArrayTable'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:872: in function 'selectionToRecordArray'
	/Users/pasi/nc/nc-server/lib/db/dsql.lua:1658: in function 'sqlExecuteUnsafe'
	/Users/pasi/nc/nc-server/nc/worker/query4d_worker.lua:66: in function 'func'
	/Users/pasi/nc/nc-server/lib/rest.lua:411: in function 'jsonValue'
	/Users/pasi/nc/nc-server/lib/rest.lua:516: in function 'createPostAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:624: in function 'createAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:845: in function 'answerFunction'
	/Users/pasi/nc/nc-server/lib/server.lua:139: in function 'answer'
	/Users/pasi/nc/nc-server/lib/server.lua:225: in function 'in_callback'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:248: in function 'poll_event'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:329: in function 'poll'
	/Users/pasi/nc/nc-server/lib/server.lua:312: in function 'pollLoop'
	/Users/pasi/nc/nc-server/nc/nc-server.lua:123: in function 'server'
	/Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:146: in function </Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:129>
	[C]: in function 'pcall'
	/Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:66: in function </Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:18>]
. 	28.1.2022 	18:30:25 	lx 	(5. Tcp Server 2)

 1. answer time: 00:00:00.00073
  
SELECT COUNT(*)
 FROM sales_order_row sor
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'. 	28.1.2022 	18:30:25 	lx 	(5. Tcp Server 2)

error: field type 'nil' is not supported, sql:
 SELECT COUNT(*)
 FROM sales_order_row sor
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'
  [stack traceback:
	/Users/pasi/nc/nc-server/lib/util.lua:572: in function 'printError'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:796: in function 'executeSql'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:846: in function 'selectionToArrayTable'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:872: in function 'selectionToRecordArray'
	/Users/pasi/nc/nc-server/lib/db/dsql.lua:1658: in function 'sqlExecuteUnsafe'
	/Users/pasi/nc/nc-server/nc/worker/query4d_worker.lua:66: in function 'func'
	/Users/pasi/nc/nc-server/lib/rest.lua:411: in function 'jsonValue'
	/Users/pasi/nc/nc-server/lib/rest.lua:516: in function 'createPostAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:624: in function 'createAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:845: in function 'answerFunction'
	/Users/pasi/nc/nc-server/lib/server.lua:139: in function 'answer'
	/Users/pasi/nc/nc-server/lib/server.lua:225: in function 'in_callback'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:248: in function 'poll_event'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:329: in function 'poll'
	/Users/pasi/nc/nc-server/lib/server.lua:312: in function 'pollLoop'
	/Users/pasi/nc/nc-server/nc/nc-server.lua:123: in function 'server'
	/Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:146: in function </Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:129>
	[C]: in function 'pcall'
	/Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:66: in function </Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:18>]

field type 'nil' is not supported, sql:
 SELECT COUNT(*)
 FROM sales_order_row sor
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'. 	28.1.2022 	18:30:25 	_lx_SERVER 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 [1] = "integer";
 ["database"] = "plg4d";
 ["field_type"] = {
  ["return_type"] = "record array";
  ["local_field"] = {
   [1] = "COUNT(*)";
  };
  ["field_type"] = {}; -- option - plg4d selectionToArrayTable (self reference)
  ["field"] = {
   [1] = "COUNT(*)";
  };
  ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
  ["query_name"] = "new:";
 };
 ["query_name"] = "dsql.sqlExecuteUnsafe";
};option - plg4d selectionToArrayTable["field_type"]["field_type"] = option - plg4d selectionToArrayTable;
. 	28.1.2022 	18:30:25 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:30:25 	lx 	(5. Tcp Server 2)

error: field type 'nil' is not supported, sql:
 SELECT COUNT(*) FROM sales_order_row
  [stack traceback:
	/Users/pasi/nc/nc-server/lib/util.lua:572: in function 'printError'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:796: in function 'executeSql'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:846: in function 'selectionToArrayTable'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:872: in function 'selectionToRecordArray'
	/Users/pasi/nc/nc-server/lib/db/dsql.lua:1658: in function 'sqlExecuteUnsafe'
	/Users/pasi/nc/nc-server/nc/worker/query4d_worker.lua:66: in function 'func'
	/Users/pasi/nc/nc-server/lib/rest.lua:411: in function 'jsonValue'
	/Users/pasi/nc/nc-server/lib/rest.lua:516: in function 'createPostAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:624: in function 'createAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:845: in function 'answerFunction'
	/Users/pasi/nc/nc-server/lib/server.lua:139: in function 'answer'
	/Users/pasi/nc/nc-server/lib/server.lua:225: in function 'in_callback'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:248: in function 'poll_event'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:329: in function 'poll'
	/Users/pasi/nc/nc-server/lib/server.lua:312: in function 'pollLoop'
	/Users/pasi/nc/nc-server/nc/nc-server.lua:123: in function 'server'
	/Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:146: in function </Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:129>
	[C]: in function 'pcall'
	/Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:66: in function </Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:18>]
. 	28.1.2022 	18:30:25 	lx 	(5. Tcp Server 2)

error: field type 'nil' is not supported, sql:
 SELECT COUNT(*) FROM sales_order_row
  [stack traceback:
	/Users/pasi/nc/nc-server/lib/util.lua:572: in function 'printError'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:796: in function 'executeSql'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:846: in function 'selectionToArrayTable'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:872: in function 'selectionToRecordArray'
	/Users/pasi/nc/nc-server/lib/db/dsql.lua:1658: in function 'sqlExecuteUnsafe'
	/Users/pasi/nc/nc-server/nc/worker/query4d_worker.lua:66: in function 'func'
	/Users/pasi/nc/nc-server/lib/rest.lua:411: in function 'jsonValue'
	/Users/pasi/nc/nc-server/lib/rest.lua:516: in function 'createPostAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:624: in function 'createAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:845: in function 'answerFunction'
	/Users/pasi/nc/nc-server/lib/server.lua:139: in function 'answer'
	/Users/pasi/nc/nc-server/lib/server.lua:225: in function 'in_callback'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:248: in function 'poll_event'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:329: in function 'poll'
	/Users/pasi/nc/nc-server/lib/server.lua:312: in function 'pollLoop'
	/Users/pasi/nc/nc-server/nc/nc-server.lua:123: in function 'server'
	/Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:146: in function </Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:129>
	[C]: in function 'pcall'
	/Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:66: in function </Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:18>]

field type 'nil' is not supported, sql:
 SELECT COUNT(*) FROM sales_order_row. 	28.1.2022 	18:30:25 	_lx_SERVER 	(5. Tcp Server 2)

Tcp server 2 is already running. 	28.1.2022 	18:30:57 	_lx_SERVER 	(6. tbl_ 5)

option - plg4d selectionToArrayTable = {
 [1] = "integer";
 ["database"] = "plg4d";
 ["field_type"] = {
  ["return_type"] = "record array";
  ["local_field"] = {
   [1] = "COUNT(*)";
  };
  ["field_type"] = {}; -- option - plg4d selectionToArrayTable (self reference)
  ["field"] = {
   [1] = "COUNT(*)";
  };
  ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
  ["query_name"] = "new:";
 };
 ["query_name"] = "dsql.sqlExecuteUnsafe";
};option - plg4d selectionToArrayTable["field_type"]["field_type"] = option - plg4d selectionToArrayTable;
. 	28.1.2022 	18:31:25 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:31:25 	lx 	(5. Tcp Server 2)

error: field type 'nil' is not supported, sql:
 SELECT COUNT(*) FROM sales_order_row
  [stack traceback:
	/Users/pasi/nc/nc-server/lib/util.lua:572: in function 'printError'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:796: in function 'executeSql'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:846: in function 'selectionToArrayTable'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:872: in function 'selectionToRecordArray'
	/Users/pasi/nc/nc-server/lib/db/dsql.lua:1658: in function 'sqlExecuteUnsafe'
	/Users/pasi/nc/nc-server/nc/worker/query4d_worker.lua:66: in function 'func'
	/Users/pasi/nc/nc-server/lib/rest.lua:411: in function 'jsonValue'
	/Users/pasi/nc/nc-server/lib/rest.lua:516: in function 'createPostAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:624: in function 'createAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:845: in function 'answerFunction'
	/Users/pasi/nc/nc-server/lib/server.lua:139: in function 'answer'
	/Users/pasi/nc/nc-server/lib/server.lua:225: in function 'in_callback'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:248: in function 'poll_event'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:329: in function 'poll'
	/Users/pasi/nc/nc-server/lib/server.lua:312: in function 'pollLoop'
	/Users/pasi/nc/nc-server/nc/nc-server.lua:123: in function 'server'
	/Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:146: in function </Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:129>
	[C]: in function 'pcall'
	/Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:66: in function </Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:18>]
. 	28.1.2022 	18:31:25 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 [1] = "integer";
 ["database"] = "plg4d";
 ["field_type"] = {
  ["return_type"] = "record array";
  ["local_field"] = {
   [1] = "COUNT(*)";
  };
  ["field_type"] = {}; -- option - plg4d selectionToArrayTable (self reference)
  ["field"] = {
   [1] = "COUNT(*)";
  };
  ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
  ["query_name"] = "new:";
 };
 ["query_name"] = "dsql.sqlExecuteUnsafe";
};option - plg4d selectionToArrayTable["field_type"]["field_type"] = option - plg4d selectionToArrayTable;
. 	28.1.2022 	18:32:25 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:32:25 	lx 	(5. Tcp Server 2)

error: field type 'nil' is not supported, sql:
 SELECT COUNT(*) FROM sales_order_row
  [stack traceback:
	/Users/pasi/nc/nc-server/lib/util.lua:572: in function 'printError'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:796: in function 'executeSql'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:846: in function 'selectionToArrayTable'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:872: in function 'selectionToRecordArray'
	/Users/pasi/nc/nc-server/lib/db/dsql.lua:1658: in function 'sqlExecuteUnsafe'
	/Users/pasi/nc/nc-server/nc/worker/query4d_worker.lua:66: in function 'func'
	/Users/pasi/nc/nc-server/lib/rest.lua:411: in function 'jsonValue'
	/Users/pasi/nc/nc-server/lib/rest.lua:516: in function 'createPostAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:624: in function 'createAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:845: in function 'answerFunction'
	/Users/pasi/nc/nc-server/lib/server.lua:139: in function 'answer'
	/Users/pasi/nc/nc-server/lib/server.lua:225: in function 'in_callback'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:248: in function 'poll_event'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:329: in function 'poll'
	/Users/pasi/nc/nc-server/lib/server.lua:312: in function 'pollLoop'
	/Users/pasi/nc/nc-server/nc/nc-server.lua:123: in function 'server'
	/Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:146: in function </Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:129>
	[C]: in function 'pcall'
	/Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:66: in function </Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:18>]
. 	28.1.2022 	18:32:25 	lx 	(5. Tcp Server 2)

Starting to stop tcp server 2, max. delay 1,7 seconds... 	28.1.2022 	18:32:33 	_lx_SERVER 	(6. tbl_ 5)

*** tcp close for sock 80, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	18:32:33 	lx 	(5. Tcp Server 2)

closing socket '80'. 	28.1.2022 	18:32:33 	lx 	(5. Tcp Server 2)

*** tcp close for sock 81, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	18:32:33 	lx 	(5. Tcp Server 2)

closing socket '81'. 	28.1.2022 	18:32:33 	lx 	(5. Tcp Server 2)

 -- Server statistics --
answerCount:          4
poll.fd_count:        1
pollCount:            5912
pollInCount:          5
pollOutCount:         0
pollCloseCount:       0
pollErrCount:         0
fd add/remove count:  3/2
totalBytesReceived:   2511
totalBytesSent:       3360. 	28.1.2022 	18:32:33 	lx 	(5. Tcp Server 2)

warning: socket type 'number' is not a table, socket number: 82
. 	28.1.2022 	18:32:33 	lx 	(5. Tcp Server 2)

closing socket '82'. 	28.1.2022 	18:32:33 	lx 	(5. Tcp Server 2)

poll.expand_fds, free old fds: cdata<struct pollfd *>: 0x01219d2f00. 	28.1.2022 	18:32:33 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x01219d2f00, size: 400. 	28.1.2022 	18:32:33 	lx 	(5. Tcp Server 2)

--- server stopped ---. 	28.1.2022 	18:32:33 	lx 	(5. Tcp Server 2)

finalizer: free p1 	 cdata<void *>: 0x01219d2f00. 	28.1.2022 	18:32:33 	lx 	(5. Tcp Server 2)

Tcp server 2 stopped. 	28.1.2022 	18:32:33 	_lx_SERVER 	(5. Tcp Server 2)

Tcp server 2 starting. 	28.1.2022 	18:32:37 	_lx_SERVER 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/table/db_connection_preference.json'. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/auth/connection.json'. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

  database connect time: 0.0003 seconds. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

* connect: connection changed to 'postgre-demo/fi_demo'. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

* paths:
 - main: '/Users/pasi/nc/nc-server/'
 - bin : '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/bin/bin_osx_arm64/'
 - pref: '/Users/pasi/nc/nc-server/preference/'
 - 4D  : '/Users/pasi/4D/mg_v19/Manageri_v19/'
. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/table/prf/group.json'. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x01236060e0, size: 400. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

********************* /Users/pasi/nc/nc-server/ *********************. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

port: 5949, arguments: '[
	5949
]', nc-server.json: '[]'. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

nc_server: debugLevel(0):0  port(5959):5949  closeConnection(0):0. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

1. Loading plugin: nc/worker/auth_worker. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

2. Loading plugin: nc/worker/query_worker. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

3. Loading plugin: nc/worker/query4d_worker. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

4. Loading plugin: nc/worker/call4d_worker. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

All plugins have been loaded. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

* cached preference files: demo-fi_demo-0 - system/option.json, demo-fi_demo-0 - table/prf/field_type.json, demo-fi_demo-0 - system/4d.json. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

* run in command line: 'ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}''. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

Mac address: f84d896921dc. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

TLS certificate files: /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/cert.pem, /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/privkey.pem. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

NC tcp server waiting on:  http://127.0.0.1:5949/,  http://192.168.32.2:5949/
                          https://127.0.0.1:5949/, https://192.168.32.2:5949/. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

NC udp server waiting on: 127.0.0.1:5949/, 192.168.32.2:5949/. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

--- server started in 0.0017 seconds, 2022-01-28 18:32:39, used memory 3004.9 kb --- 	 5. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

OSX arm64, using: rapidjson-arm, lfs-ffi. 	28.1.2022 	18:32:39 	lx 	(5. Tcp Server 2)

1. uri: HTTP, POST '/rest/nc/query/sql4d' 2022-01-28 18:32:45
'POST /rest/nc/query/sql4d HTTP/1.1
Content-Type: application/json
Connection: keep-alive
User-Agent: nc-rest-sql
Authorization: Basic ???
Content-Encoding: lz4
Accept-Encoding: lz4
Content-Length: 447
Content-Uncompressed-Length: 502

LZ4. 	28.1.2022 	18:32:45 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	18:32:45 	lx 	(5. Tcp Server 2)

    Connected to: 'Manageri v12 plg4d local, , database: plg4d, user: manage_demo'. 	28.1.2022 	18:32:45 	lx 	(5. Tcp Server 2)

  database connect time: 0.0002 seconds. 	28.1.2022 	18:32:45 	lx 	(5. Tcp Server 2)

* connect: connection changed from 'postgre-demo/fi_demo' to 'plg4d/plg4d'. 	28.1.2022 	18:32:45 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArraym returnTableType: 'record array'. 	28.1.2022 	18:32:45 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 [1] = "integer";
 ["query_name"] = "dsql.sqlExecuteUnsafe";
 ["database"] = "plg4d";
 ["field_type"] = {
  ["return_type"] = "record array";
  ["query_name"] = "new:";
  ["table_prefix"] = "ordr";
  ["field"] = {
   [1] = "order_row-sales";
  };
  ["local_field"] = {
   [1] = "order_row-sales";
  };
  ["field_type"] = {}; -- option - plg4d selectionToArrayTable (self reference)
  ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
 };
};option - plg4d selectionToArrayTable["field_type"]["field_type"] = option - plg4d selectionToArrayTable;
. 	28.1.2022 	18:32:45 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:32:45 	lx 	(5. Tcp Server 2)

error: field type 'nil' is not supported, sql:
 SELECT COUNT(*)
 FROM sales_order_row sor
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'
  [stack traceback:
	/Users/pasi/nc/nc-server/lib/util.lua:572: in function 'printError'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:796: in function 'executeSql'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:846: in function 'selectionToArrayTable'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:872: in function 'selectionToRecordArray'
	/Users/pasi/nc/nc-server/lib/db/dsql.lua:1659: in function 'sqlExecuteUnsafe'
	/Users/pasi/nc/nc-server/nc/worker/query4d_worker.lua:66: in function 'func'
	/Users/pasi/nc/nc-server/lib/rest.lua:411: in function 'jsonValue'
	/Users/pasi/nc/nc-server/lib/rest.lua:516: in function 'createPostAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:624: in function 'createAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:845: in function 'answerFunction'
	/Users/pasi/nc/nc-server/lib/server.lua:139: in function 'answer'
	/Users/pasi/nc/nc-server/lib/server.lua:225: in function 'in_callback'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:248: in function 'poll_event'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:329: in function 'poll'
	/Users/pasi/nc/nc-server/lib/server.lua:312: in function 'pollLoop'
	/Users/pasi/nc/nc-server/nc/nc-server.lua:123: in function 'server'
	/Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:146: in function </Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:129>
	[C]: in function 'pcall'
	/Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:66: in function </Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:18>]
. 	28.1.2022 	18:32:45 	lx 	(5. Tcp Server 2)

 1. answer time: 00:00:00.00101
  
SELECT COUNT(*)
 FROM sales_order_row sor
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'. 	28.1.2022 	18:32:45 	lx 	(5. Tcp Server 2)

error: field type 'nil' is not supported, sql:
 SELECT COUNT(*)
 FROM sales_order_row sor
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'
  [stack traceback:
	/Users/pasi/nc/nc-server/lib/util.lua:572: in function 'printError'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:796: in function 'executeSql'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:846: in function 'selectionToArrayTable'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:872: in function 'selectionToRecordArray'
	/Users/pasi/nc/nc-server/lib/db/dsql.lua:1659: in function 'sqlExecuteUnsafe'
	/Users/pasi/nc/nc-server/nc/worker/query4d_worker.lua:66: in function 'func'
	/Users/pasi/nc/nc-server/lib/rest.lua:411: in function 'jsonValue'
	/Users/pasi/nc/nc-server/lib/rest.lua:516: in function 'createPostAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:624: in function 'createAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:845: in function 'answerFunction'
	/Users/pasi/nc/nc-server/lib/server.lua:139: in function 'answer'
	/Users/pasi/nc/nc-server/lib/server.lua:225: in function 'in_callback'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:248: in function 'poll_event'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:329: in function 'poll'
	/Users/pasi/nc/nc-server/lib/server.lua:312: in function 'pollLoop'
	/Users/pasi/nc/nc-server/nc/nc-server.lua:123: in function 'server'
	/Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:146: in function </Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:129>
	[C]: in function 'pcall'
	/Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:66: in function </Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:18>]

field type 'nil' is not supported, sql:
 SELECT COUNT(*)
 FROM sales_order_row sor
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'. 	28.1.2022 	18:32:45 	_lx_SERVER 	(5. Tcp Server 2)

sqlExecuteUnsafeArraym returnTableType: 'record array'. 	28.1.2022 	18:32:45 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 [1] = "integer";
 ["query_name"] = "dsql.sqlExecuteUnsafe";
 ["database"] = "plg4d";
 ["field_type"] = {
  ["return_type"] = "record array";
  ["query_name"] = "new:";
  ["local_field"] = {
   [1] = "COUNT(*)";
  };
  ["field"] = {
   [1] = "COUNT(*)";
  };
  ["field_type"] = {}; -- option - plg4d selectionToArrayTable (self reference)
  ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
 };
};option - plg4d selectionToArrayTable["field_type"]["field_type"] = option - plg4d selectionToArrayTable;
. 	28.1.2022 	18:32:45 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:32:45 	lx 	(5. Tcp Server 2)

error: field type 'nil' is not supported, sql:
 SELECT COUNT(*) FROM sales_order_row
  [stack traceback:
	/Users/pasi/nc/nc-server/lib/util.lua:572: in function 'printError'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:796: in function 'executeSql'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:846: in function 'selectionToArrayTable'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:872: in function 'selectionToRecordArray'
	/Users/pasi/nc/nc-server/lib/db/dsql.lua:1659: in function 'sqlExecuteUnsafe'
	/Users/pasi/nc/nc-server/nc/worker/query4d_worker.lua:66: in function 'func'
	/Users/pasi/nc/nc-server/lib/rest.lua:411: in function 'jsonValue'
	/Users/pasi/nc/nc-server/lib/rest.lua:516: in function 'createPostAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:624: in function 'createAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:845: in function 'answerFunction'
	/Users/pasi/nc/nc-server/lib/server.lua:139: in function 'answer'
	/Users/pasi/nc/nc-server/lib/server.lua:225: in function 'in_callback'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:248: in function 'poll_event'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:329: in function 'poll'
	/Users/pasi/nc/nc-server/lib/server.lua:312: in function 'pollLoop'
	/Users/pasi/nc/nc-server/nc/nc-server.lua:123: in function 'server'
	/Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:146: in function </Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:129>
	[C]: in function 'pcall'
	/Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:66: in function </Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:18>]
. 	28.1.2022 	18:32:45 	lx 	(5. Tcp Server 2)

error: field type 'nil' is not supported, sql:
 SELECT COUNT(*) FROM sales_order_row
  [stack traceback:
	/Users/pasi/nc/nc-server/lib/util.lua:572: in function 'printError'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:796: in function 'executeSql'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:846: in function 'selectionToArrayTable'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:872: in function 'selectionToRecordArray'
	/Users/pasi/nc/nc-server/lib/db/dsql.lua:1659: in function 'sqlExecuteUnsafe'
	/Users/pasi/nc/nc-server/nc/worker/query4d_worker.lua:66: in function 'func'
	/Users/pasi/nc/nc-server/lib/rest.lua:411: in function 'jsonValue'
	/Users/pasi/nc/nc-server/lib/rest.lua:516: in function 'createPostAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:624: in function 'createAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:845: in function 'answerFunction'
	/Users/pasi/nc/nc-server/lib/server.lua:139: in function 'answer'
	/Users/pasi/nc/nc-server/lib/server.lua:225: in function 'in_callback'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:248: in function 'poll_event'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:329: in function 'poll'
	/Users/pasi/nc/nc-server/lib/server.lua:312: in function 'pollLoop'
	/Users/pasi/nc/nc-server/nc/nc-server.lua:123: in function 'server'
	/Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:146: in function </Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:129>
	[C]: in function 'pcall'
	/Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:66: in function </Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:18>]

field type 'nil' is not supported, sql:
 SELECT COUNT(*) FROM sales_order_row. 	28.1.2022 	18:32:45 	_lx_SERVER 	(5. Tcp Server 2)

*** tcp close for sock 83, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 611 bytes ***. 	28.1.2022 	18:33:07 	lx 	(5. Tcp Server 2)

closing socket '83'. 	28.1.2022 	18:33:07 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArraym returnTableType: 'record array'. 	28.1.2022 	18:33:10 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 [1] = "integer";
 ["query_name"] = "dsql.sqlExecuteUnsafe";
 ["database"] = "plg4d";
 ["field_type"] = {
  ["return_type"] = "record array";
  ["query_name"] = "new:";
  ["local_field"] = {
   [1] = "order_row-sales";
  };
  ["field"] = {
   [1] = "order_row-sales";
  };
  ["table_prefix"] = "ordr";
  ["field_type"] = {}; -- option - plg4d selectionToArrayTable (self reference)
  ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
 };
};option - plg4d selectionToArrayTable["field_type"]["field_type"] = option - plg4d selectionToArrayTable;
. 	28.1.2022 	18:33:10 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:33:10 	lx 	(5. Tcp Server 2)

error: field type 'nil' is not supported, sql:
 SELECT COUNT(*)
 FROM sales_order_row sor
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'
  [stack traceback:
	/Users/pasi/nc/nc-server/lib/util.lua:572: in function 'printError'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:796: in function 'executeSql'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:846: in function 'selectionToArrayTable'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:872: in function 'selectionToRecordArray'
	/Users/pasi/nc/nc-server/lib/db/dsql.lua:1659: in function 'sqlExecuteUnsafe'
	/Users/pasi/nc/nc-server/nc/worker/query4d_worker.lua:66: in function 'func'
	/Users/pasi/nc/nc-server/lib/rest.lua:411: in function 'jsonValue'
	/Users/pasi/nc/nc-server/lib/rest.lua:516: in function 'createPostAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:624: in function 'createAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:845: in function 'answerFunction'
	/Users/pasi/nc/nc-server/lib/server.lua:139: in function 'answer'
	/Users/pasi/nc/nc-server/lib/server.lua:225: in function 'in_callback'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:248: in function 'poll_event'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:329: in function 'poll'
	/Users/pasi/nc/nc-server/lib/server.lua:312: in function 'pollLoop'
	/Users/pasi/nc/nc-server/nc/nc-server.lua:123: in function 'server'
	/Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:146: in function </Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:129>
	[C]: in function 'pcall'
	/Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:66: in function </Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:18>]
. 	28.1.2022 	18:33:10 	lx 	(5. Tcp Server 2)

error: field type 'nil' is not supported, sql:
 SELECT COUNT(*)
 FROM sales_order_row sor
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'
  [stack traceback:
	/Users/pasi/nc/nc-server/lib/util.lua:572: in function 'printError'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:796: in function 'executeSql'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:846: in function 'selectionToArrayTable'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:872: in function 'selectionToRecordArray'
	/Users/pasi/nc/nc-server/lib/db/dsql.lua:1659: in function 'sqlExecuteUnsafe'
	/Users/pasi/nc/nc-server/nc/worker/query4d_worker.lua:66: in function 'func'
	/Users/pasi/nc/nc-server/lib/rest.lua:411: in function 'jsonValue'
	/Users/pasi/nc/nc-server/lib/rest.lua:516: in function 'createPostAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:624: in function 'createAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:845: in function 'answerFunction'
	/Users/pasi/nc/nc-server/lib/server.lua:139: in function 'answer'
	/Users/pasi/nc/nc-server/lib/server.lua:225: in function 'in_callback'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:248: in function 'poll_event'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:329: in function 'poll'
	/Users/pasi/nc/nc-server/lib/server.lua:312: in function 'pollLoop'
	/Users/pasi/nc/nc-server/nc/nc-server.lua:123: in function 'server'
	/Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:146: in function </Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:129>
	[C]: in function 'pcall'
	/Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:66: in function </Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:18>]

field type 'nil' is not supported, sql:
 SELECT COUNT(*)
 FROM sales_order_row sor
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'. 	28.1.2022 	18:33:10 	_lx_SERVER 	(5. Tcp Server 2)

sqlExecuteUnsafeArraym returnTableType: 'record array'. 	28.1.2022 	18:33:11 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 [1] = "integer";
 ["query_name"] = "dsql.sqlExecuteUnsafe";
 ["database"] = "plg4d";
 ["field_type"] = {
  ["return_type"] = "record array";
  ["query_name"] = "new:";
  ["local_field"] = {
   [1] = "COUNT(*)";
  };
  ["field"] = {
   [1] = "COUNT(*)";
  };
  ["field_type"] = {}; -- option - plg4d selectionToArrayTable (self reference)
  ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
 };
};option - plg4d selectionToArrayTable["field_type"]["field_type"] = option - plg4d selectionToArrayTable;
. 	28.1.2022 	18:33:11 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:33:11 	lx 	(5. Tcp Server 2)

error: field type 'nil' is not supported, sql:
 SELECT COUNT(*) FROM sales_order_row
  [stack traceback:
	/Users/pasi/nc/nc-server/lib/util.lua:572: in function 'printError'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:796: in function 'executeSql'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:846: in function 'selectionToArrayTable'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:872: in function 'selectionToRecordArray'
	/Users/pasi/nc/nc-server/lib/db/dsql.lua:1659: in function 'sqlExecuteUnsafe'
	/Users/pasi/nc/nc-server/nc/worker/query4d_worker.lua:66: in function 'func'
	/Users/pasi/nc/nc-server/lib/rest.lua:411: in function 'jsonValue'
	/Users/pasi/nc/nc-server/lib/rest.lua:516: in function 'createPostAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:624: in function 'createAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:845: in function 'answerFunction'
	/Users/pasi/nc/nc-server/lib/server.lua:139: in function 'answer'
	/Users/pasi/nc/nc-server/lib/server.lua:225: in function 'in_callback'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:248: in function 'poll_event'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:329: in function 'poll'
	/Users/pasi/nc/nc-server/lib/server.lua:312: in function 'pollLoop'
	/Users/pasi/nc/nc-server/nc/nc-server.lua:123: in function 'server'
	/Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:146: in function </Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:129>
	[C]: in function 'pcall'
	/Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:66: in function </Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:18>]
. 	28.1.2022 	18:33:11 	lx 	(5. Tcp Server 2)

error: field type 'nil' is not supported, sql:
 SELECT COUNT(*) FROM sales_order_row
  [stack traceback:
	/Users/pasi/nc/nc-server/lib/util.lua:572: in function 'printError'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:796: in function 'executeSql'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:846: in function 'selectionToArrayTable'
	/Users/pasi/nc/nc-server/lib/db/plg4d.lua:872: in function 'selectionToRecordArray'
	/Users/pasi/nc/nc-server/lib/db/dsql.lua:1659: in function 'sqlExecuteUnsafe'
	/Users/pasi/nc/nc-server/nc/worker/query4d_worker.lua:66: in function 'func'
	/Users/pasi/nc/nc-server/lib/rest.lua:411: in function 'jsonValue'
	/Users/pasi/nc/nc-server/lib/rest.lua:516: in function 'createPostAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:624: in function 'createAnswer'
	/Users/pasi/nc/nc-server/lib/rest.lua:845: in function 'answerFunction'
	/Users/pasi/nc/nc-server/lib/server.lua:139: in function 'answer'
	/Users/pasi/nc/nc-server/lib/server.lua:225: in function 'in_callback'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:248: in function 'poll_event'
	/Users/pasi/nc/nc-server/lib/lib_poll.lua:329: in function 'poll'
	/Users/pasi/nc/nc-server/lib/server.lua:312: in function 'pollLoop'
	/Users/pasi/nc/nc-server/nc/nc-server.lua:123: in function 'server'
	/Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:146: in function </Users/pasi/nc/nc-server/manager/4d/nc_server_4d.lua:129>
	[C]: in function 'pcall'
	/Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:66: in function </Users/pasi/nc/nc-server/manager/4d/run_from_4d.lua:18>]

field type 'nil' is not supported, sql:
 SELECT COUNT(*) FROM sales_order_row. 	28.1.2022 	18:33:11 	_lx_SERVER 	(5. Tcp Server 2)

Starting to stop tcp server 2, max. delay 1,7 seconds... 	28.1.2022 	18:33:16 	_lx_SERVER 	(6. tbl_ 5)

*** tcp close for sock 81, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	18:33:16 	lx 	(5. Tcp Server 2)

closing socket '81'. 	28.1.2022 	18:33:16 	lx 	(5. Tcp Server 2)

*** tcp close for sock 82, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	18:33:16 	lx 	(5. Tcp Server 2)

closing socket '82'. 	28.1.2022 	18:33:16 	lx 	(5. Tcp Server 2)

 -- Server statistics --
answerCount:          4
poll.fd_count:        1
pollCount:            1648
pollInCount:          6
pollOutCount:         0
pollCloseCount:       1
pollErrCount:         0
fd add/remove count:  4/3
totalBytesReceived:   2654
totalBytesSent:       3456. 	28.1.2022 	18:33:16 	lx 	(5. Tcp Server 2)

warning: socket type 'number' is not a table, socket number: 83
. 	28.1.2022 	18:33:16 	lx 	(5. Tcp Server 2)

closing socket '83'. 	28.1.2022 	18:33:16 	lx 	(5. Tcp Server 2)

poll.expand_fds, free old fds: cdata<struct pollfd *>: 0x01236060e0. 	28.1.2022 	18:33:16 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x01236060e0, size: 400. 	28.1.2022 	18:33:16 	lx 	(5. Tcp Server 2)

--- server stopped ---. 	28.1.2022 	18:33:16 	lx 	(5. Tcp Server 2)

finalizer: free p1 	 cdata<void *>: 0x01236060e0. 	28.1.2022 	18:33:16 	lx 	(5. Tcp Server 2)

Tcp server 2 stopped. 	28.1.2022 	18:33:16 	_lx_SERVER 	(5. Tcp Server 2)

Tcp server 2 starting. 	28.1.2022 	18:33:19 	_lx_SERVER 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/table/db_connection_preference.json'. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/auth/connection.json'. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

  database connect time: 0.0005 seconds. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

* connect: connection changed to 'postgre-demo/fi_demo'. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

* paths:
 - main: '/Users/pasi/nc/nc-server/'
 - bin : '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/bin/bin_osx_arm64/'
 - pref: '/Users/pasi/nc/nc-server/preference/'
 - 4D  : '/Users/pasi/4D/mg_v19/Manageri_v19/'
. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/table/prf/group.json'. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x01219fa780, size: 400. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

********************* /Users/pasi/nc/nc-server/ *********************. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

port: 5949, arguments: '[
	5949
]', nc-server.json: '[]'. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

nc_server: debugLevel(0):0  port(5959):5949  closeConnection(0):0. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

1. Loading plugin: nc/worker/auth_worker. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

2. Loading plugin: nc/worker/query_worker. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

3. Loading plugin: nc/worker/query4d_worker. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

4. Loading plugin: nc/worker/call4d_worker. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

All plugins have been loaded. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

* cached preference files: demo-fi_demo-0 - system/4d.json, demo-fi_demo-0 - table/prf/field_type.json, demo-fi_demo-0 - system/option.json. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

* run in command line: 'ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}''. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

Mac address: f84d896921dc. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

TLS certificate files: /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/cert.pem, /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/privkey.pem. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

NC tcp server waiting on:  http://127.0.0.1:5949/,  http://192.168.32.2:5949/
                          https://127.0.0.1:5949/, https://192.168.32.2:5949/. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

NC udp server waiting on: 127.0.0.1:5949/, 192.168.32.2:5949/. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

--- server started in 0.0022 seconds, 2022-01-28 18:33:20, used memory 3004.9 kb --- 	 5. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

OSX arm64, using: rapidjson-arm, lfs-ffi. 	28.1.2022 	18:33:20 	lx 	(5. Tcp Server 2)

1. uri: HTTP, POST '/rest/nc/query/sql4d' 2022-01-28 18:33:24
'POST /rest/nc/query/sql4d HTTP/1.1
Content-Type: application/json
Connection: keep-alive
User-Agent: nc-rest-sql
Authorization: Basic ???
Content-Encoding: lz4
Accept-Encoding: lz4
Content-Length: 449
Content-Uncompressed-Length: 502

LZ4. 	28.1.2022 	18:33:24 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	18:33:24 	lx 	(5. Tcp Server 2)

    Connected to: 'Manageri v12 plg4d local, , database: plg4d, user: manage_demo'. 	28.1.2022 	18:33:24 	lx 	(5. Tcp Server 2)

  database connect time: 0.0001 seconds. 	28.1.2022 	18:33:24 	lx 	(5. Tcp Server 2)

* connect: connection changed from 'postgre-demo/fi_demo' to 'plg4d/plg4d'. 	28.1.2022 	18:33:24 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArraym returnTableType: 'record array'. 	28.1.2022 	18:33:24 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["table_prefix"] = "ordr";
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
 ["field"] = {
  [1] = "order_row-sales";
 };
 ["local_field"] = {
  [1] = "order_row-sales";
 };
 ["query_name"] = "new:";
 ["database"] = "plg4d";
 ["field_type"] = {
  [1] = "integer";
 };
 ["return_type"] = "record array";
};. 	28.1.2022 	18:33:24 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:33:24 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:33:24 	lx 	(5. Tcp Server 2)

 1. answer time: 00:00:00.00085
  
SELECT COUNT(*)
 FROM sales_order_row sor
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'. 	28.1.2022 	18:33:24 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArraym returnTableType: 'record array'. 	28.1.2022 	18:33:24 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["database"] = "plg4d";
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["return_type"] = "record array";
 ["query_name"] = "new:";
};. 	28.1.2022 	18:33:24 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:33:24 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:33:24 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArraym returnTableType: 'record array'. 	28.1.2022 	18:33:24 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["table_prefix"] = "ord";
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order so\
 WHERE so.change_id > '20220128.171040.9f00j.so_  zzy0ae544bd03e1d06'";
 ["field"] = {
  [1] = "order-sales";
 };
 ["local_field"] = {
  [1] = "order-sales";
 };
 ["query_name"] = "new:";
 ["database"] = "plg4d";
 ["field_type"] = {
  [1] = "integer";
 };
 ["return_type"] = "record array";
};. 	28.1.2022 	18:33:24 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:33:24 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:33:24 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArraym returnTableType: 'record array'. 	28.1.2022 	18:33:24 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["database"] = "plg4d";
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order";
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["return_type"] = "record array";
 ["query_name"] = "new:";
};. 	28.1.2022 	18:33:24 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:33:24 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:33:24 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArraym returnTableType: 'record array'. 	28.1.2022 	18:33:45 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["table_prefix"] = "ordr";
 ["sql"] = "SELECT sor.record_id\
 FROM sales_order_row sor\
 WHERE sor.record_id IS NOT NULL\
 LIMIT 3";
 ["field"] = {
  [1] = "sor.record_id";
 };
 ["local_field"] = {
  [1] = "ordr.record_id";
 };
 ["query_name"] = "new:dsql.sqlExecuteUnsafe";
 ["database"] = "plg4d";
 ["field_type"] = {
  [1] = "string";
 };
 ["return_type"] = "array table";
};. 	28.1.2022 	18:33:45 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTablereturnType: record array. 	28.1.2022 	18:33:45 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:33:45 	lx 	(5. Tcp Server 2)

Starting to stop tcp server 2, max. delay 1,7 seconds... 	28.1.2022 	18:35:31 	_lx_SERVER 	(6. tbl_ 5)

*** tcp close for sock 82, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	18:35:31 	lx 	(5. Tcp Server 2)

closing socket '82'. 	28.1.2022 	18:35:31 	lx 	(5. Tcp Server 2)

*** tcp close for sock 83, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	18:35:31 	lx 	(5. Tcp Server 2)

closing socket '83'. 	28.1.2022 	18:35:31 	lx 	(5. Tcp Server 2)

 -- Server statistics --
answerCount:          5
poll.fd_count:        1
pollCount:            5936
pollInCount:          6
pollOutCount:         0
pollCloseCount:       0
pollErrCount:         0
fd add/remove count:  3/2
totalBytesReceived:   3352
totalBytesSent:       1571. 	28.1.2022 	18:35:31 	lx 	(5. Tcp Server 2)

warning: socket type 'number' is not a table, socket number: 84
. 	28.1.2022 	18:35:31 	lx 	(5. Tcp Server 2)

closing socket '84'. 	28.1.2022 	18:35:31 	lx 	(5. Tcp Server 2)

poll.expand_fds, free old fds: cdata<struct pollfd *>: 0x01219fa780. 	28.1.2022 	18:35:31 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x01219fa780, size: 400. 	28.1.2022 	18:35:31 	lx 	(5. Tcp Server 2)

--- server stopped ---. 	28.1.2022 	18:35:31 	lx 	(5. Tcp Server 2)

finalizer: free p1 	 cdata<void *>: 0x01219fa780. 	28.1.2022 	18:35:32 	lx 	(5. Tcp Server 2)

Tcp server 2 stopped. 	28.1.2022 	18:35:32 	_lx_SERVER 	(5. Tcp Server 2)

Tcp server 2 starting. 	28.1.2022 	18:35:48 	_lx_SERVER 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/table/db_connection_preference.json'. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/auth/connection.json'. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

  database connect time: 0.0003 seconds. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

* connect: connection changed to 'postgre-demo/fi_demo'. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

* paths:
 - main: '/Users/pasi/nc/nc-server/'
 - bin : '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/bin/bin_osx_arm64/'
 - pref: '/Users/pasi/nc/nc-server/preference/'
 - 4D  : '/Users/pasi/4D/mg_v19/Manageri_v19/'
. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/table/prf/group.json'. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0124835100, size: 400. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

********************* /Users/pasi/nc/nc-server/ *********************. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

port: 5949, arguments: '[
	5949
]', nc-server.json: '[]'. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

nc_server: debugLevel(0):0  port(5959):5949  closeConnection(0):0. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

1. Loading plugin: nc/worker/auth_worker. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

2. Loading plugin: nc/worker/query_worker. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

3. Loading plugin: nc/worker/query4d_worker. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

4. Loading plugin: nc/worker/call4d_worker. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

All plugins have been loaded. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

* cached preference files: demo-fi_demo-0 - table/prf/field_type.json, demo-fi_demo-0 - system/4d.json, demo-fi_demo-0 - system/option.json. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

* run in command line: 'ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}''. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

Mac address: f84d896921dc. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

TLS certificate files: /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/cert.pem, /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/privkey.pem. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

NC tcp server waiting on:  http://127.0.0.1:5949/,  http://192.168.32.2:5949/
                          https://127.0.0.1:5949/, https://192.168.32.2:5949/. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

NC udp server waiting on: 127.0.0.1:5949/, 192.168.32.2:5949/. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

--- server started in 0.0018 seconds, 2022-01-28 18:35:49, used memory 3004.9 kb --- 	 5. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

OSX arm64, using: rapidjson-arm, lfs-ffi. 	28.1.2022 	18:35:49 	lx 	(5. Tcp Server 2)

1. uri: HTTP, POST '/rest/nc/query/sql4d' 2022-01-28 18:35:56
'POST /rest/nc/query/sql4d HTTP/1.1
Content-Type: application/json
Connection: keep-alive
User-Agent: nc-rest-sql
Authorization: Basic ???
Content-Encoding: lz4
Accept-Encoding: lz4
Content-Length: 438
Content-Uncompressed-Length: 502

LZ4. 	28.1.2022 	18:35:56 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	18:35:56 	lx 	(5. Tcp Server 2)

    Connected to: 'Manageri v12 plg4d local, , database: plg4d, user: manage_demo'. 	28.1.2022 	18:35:56 	lx 	(5. Tcp Server 2)

  database connect time: 0.0001 seconds. 	28.1.2022 	18:35:56 	lx 	(5. Tcp Server 2)

* connect: connection changed from 'postgre-demo/fi_demo' to 'plg4d/plg4d'. 	28.1.2022 	18:35:56 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	18:35:56 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["query_name"] = "new:";
 ["local_field"] = {
  [1] = "order_row-sales";
 };
 ["return_type"] = "record array";
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
 ["table_prefix"] = "ordr";
 ["field_type"] = {
  [1] = "integer";
 };
 ["field"] = {
  [1] = "order_row-sales";
 };
 ["database"] = "plg4d";
};. 	28.1.2022 	18:35:56 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	18:35:56 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:35:56 	lx 	(5. Tcp Server 2)

 1. answer time: 00:00:00.00080
  
SELECT COUNT(*)
 FROM sales_order_row sor
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'. 	28.1.2022 	18:35:56 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	18:35:57 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["query_name"] = "new:";
 ["return_type"] = "record array";
 ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["database"] = "plg4d";
};. 	28.1.2022 	18:35:57 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	18:35:57 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:35:57 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	18:35:57 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["query_name"] = "new:";
 ["local_field"] = {
  [1] = "order-sales";
 };
 ["return_type"] = "record array";
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order so\
 WHERE so.change_id > '20220128.171040.9f00j.so_  zzy0ae544bd03e1d06'";
 ["table_prefix"] = "ord";
 ["field_type"] = {
  [1] = "integer";
 };
 ["field"] = {
  [1] = "order-sales";
 };
 ["database"] = "plg4d";
};. 	28.1.2022 	18:35:57 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	18:35:57 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:35:57 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	18:35:57 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["query_name"] = "new:";
 ["return_type"] = "record array";
 ["sql"] = "SELECT COUNT(*) FROM sales_order";
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["database"] = "plg4d";
};. 	28.1.2022 	18:35:57 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	18:35:57 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:35:57 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	18:36:09 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["query_name"] = "new:dsql.sqlExecuteUnsafe";
 ["local_field"] = {
  [1] = "ordr.record_id";
 };
 ["return_type"] = "array table";
 ["sql"] = "SELECT sor.record_id\
 FROM sales_order_row sor\
 WHERE sor.record_id IS NOT NULL\
 LIMIT 3";
 ["table_prefix"] = "ordr";
 ["field_type"] = {
  [1] = "string";
 };
 ["field"] = {
  [1] = "sor.record_id";
 };
 ["database"] = "plg4d";
};. 	28.1.2022 	18:36:09 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	18:36:09 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:36:09 	lx 	(5. Tcp Server 2)

Starting to stop tcp server 2, max. delay 1,7 seconds... 	28.1.2022 	18:39:37 	_lx_SERVER 	(6. tbl_ 5)

*** tcp close for sock 83, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	18:39:37 	lx 	(5. Tcp Server 2)

closing socket '83'. 	28.1.2022 	18:39:37 	lx 	(5. Tcp Server 2)

*** tcp close for sock 84, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	18:39:37 	lx 	(5. Tcp Server 2)

closing socket '84'. 	28.1.2022 	18:39:37 	lx 	(5. Tcp Server 2)

 -- Server statistics --
answerCount:          5
poll.fd_count:        1
pollCount:            10200
pollInCount:          6
pollOutCount:         0
pollCloseCount:       0
pollErrCount:         0
fd add/remove count:  3/2
totalBytesReceived:   3313
totalBytesSent:       1571. 	28.1.2022 	18:39:37 	lx 	(5. Tcp Server 2)

warning: socket type 'number' is not a table, socket number: 85
. 	28.1.2022 	18:39:37 	lx 	(5. Tcp Server 2)

closing socket '85'. 	28.1.2022 	18:39:37 	lx 	(5. Tcp Server 2)

poll.expand_fds, free old fds: cdata<struct pollfd *>: 0x0124835100. 	28.1.2022 	18:39:37 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0124835100, size: 400. 	28.1.2022 	18:39:37 	lx 	(5. Tcp Server 2)

--- server stopped ---. 	28.1.2022 	18:39:37 	lx 	(5. Tcp Server 2)

finalizer: free p1 	 cdata<void *>: 0x0124835100. 	28.1.2022 	18:39:37 	lx 	(5. Tcp Server 2)

Tcp server 2 stopped. 	28.1.2022 	18:39:37 	_lx_SERVER 	(5. Tcp Server 2)

Tcp server 2 starting. 	28.1.2022 	18:39:53 	_lx_SERVER 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/table/db_connection_preference.json'. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/auth/connection.json'. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

  database connect time: 0.0003 seconds. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

* connect: connection changed to 'postgre-demo/fi_demo'. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

* paths:
 - main: '/Users/pasi/nc/nc-server/'
 - bin : '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/bin/bin_osx_arm64/'
 - pref: '/Users/pasi/nc/nc-server/preference/'
 - 4D  : '/Users/pasi/4D/mg_v19/Manageri_v19/'
. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/table/prf/group.json'. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x01249ddb00, size: 400. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

********************* /Users/pasi/nc/nc-server/ *********************. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

port: 5949, arguments: '[
	5949
]', nc-server.json: '[]'. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

nc_server: debugLevel(0):0  port(5959):5949  closeConnection(0):0. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

1. Loading plugin: nc/worker/auth_worker. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

2. Loading plugin: nc/worker/query_worker. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

3. Loading plugin: nc/worker/query4d_worker. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

4. Loading plugin: nc/worker/call4d_worker. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

All plugins have been loaded. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

* cached preference files: demo-fi_demo-0 - system/option.json, demo-fi_demo-0 - table/prf/field_type.json, demo-fi_demo-0 - system/4d.json. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

* run in command line: 'ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}''. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

Mac address: f84d896921dc. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

TLS certificate files: /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/cert.pem, /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/privkey.pem. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

NC tcp server waiting on:  http://127.0.0.1:5949/,  http://192.168.32.2:5949/
                          https://127.0.0.1:5949/, https://192.168.32.2:5949/. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

NC udp server waiting on: 127.0.0.1:5949/, 192.168.32.2:5949/. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

--- server started in 0.0020 seconds, 2022-01-28 18:39:55, used memory 3000.4 kb --- 	 5. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

OSX arm64, using: rapidjson-arm, lfs-ffi. 	28.1.2022 	18:39:55 	lx 	(5. Tcp Server 2)

1. uri: HTTP, POST '/rest/nc/query/sql4d' 2022-01-28 18:40:01
'POST /rest/nc/query/sql4d HTTP/1.1
Content-Type: application/json
Connection: keep-alive
User-Agent: nc-rest-sql
Authorization: Basic ???
Content-Encoding: lz4
Accept-Encoding: lz4
Content-Length: 436
Content-Uncompressed-Length: 502

LZ4. 	28.1.2022 	18:40:01 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	18:40:01 	lx 	(5. Tcp Server 2)

    Connected to: 'Manageri v12 plg4d local, , database: plg4d, user: manage_demo'. 	28.1.2022 	18:40:01 	lx 	(5. Tcp Server 2)

  database connect time: 0.0001 seconds. 	28.1.2022 	18:40:01 	lx 	(5. Tcp Server 2)

* connect: connection changed from 'postgre-demo/fi_demo' to 'plg4d/plg4d'. 	28.1.2022 	18:40:01 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	18:40:01 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["return_type"] = "record array";
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
 ["field"] = {
  [1] = "order_row-sales";
 };
 ["query_name"] = "new:";
 ["database"] = "plg4d";
 ["table_prefix"] = "ordr";
 ["local_field"] = {
  [1] = "order_row-sales";
 };
};. 	28.1.2022 	18:40:01 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	18:40:01 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:40:01 	lx 	(5. Tcp Server 2)

 1. answer time: 00:00:00.00117
  
SELECT COUNT(*)
 FROM sales_order_row sor
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'. 	28.1.2022 	18:40:01 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	18:40:01 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["return_type"] = "record array";
 ["query_name"] = "new:";
 ["database"] = "plg4d";
 ["field_type"] = {
  [1] = "integer";
 };
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
};. 	28.1.2022 	18:40:01 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	18:40:01 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:40:01 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	18:40:01 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["return_type"] = "record array";
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order so\
 WHERE so.change_id > '20220128.171040.9f00j.so_  zzy0ae544bd03e1d06'";
 ["field"] = {
  [1] = "order-sales";
 };
 ["query_name"] = "new:";
 ["database"] = "plg4d";
 ["table_prefix"] = "ord";
 ["local_field"] = {
  [1] = "order-sales";
 };
};. 	28.1.2022 	18:40:01 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	18:40:01 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:40:01 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	18:40:02 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["sql"] = "SELECT COUNT(*) FROM sales_order";
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["return_type"] = "record array";
 ["query_name"] = "new:";
 ["database"] = "plg4d";
 ["field_type"] = {
  [1] = "integer";
 };
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
};. 	28.1.2022 	18:40:02 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	18:40:02 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:40:02 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	18:40:10 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["return_type"] = "array table";
 ["field_type"] = {
  [1] = "string";
 };
 ["sql"] = "SELECT sor.record_id\
 FROM sales_order_row sor\
 WHERE sor.record_id IS NOT NULL\
 LIMIT 3";
 ["field"] = {
  [1] = "sor.record_id";
 };
 ["query_name"] = "new:dsql.sqlExecuteUnsafe";
 ["database"] = "plg4d";
 ["table_prefix"] = "ordr";
 ["local_field"] = {
  [1] = "ordr.record_id";
 };
};. 	28.1.2022 	18:40:10 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	18:40:10 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:40:10 	lx 	(5. Tcp Server 2)

Starting to stop tcp server 2, max. delay 1,7 seconds... 	28.1.2022 	18:44:49 	_lx_SERVER 	(6. tbl_ 5)

*** tcp close for sock 84, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	18:44:49 	lx 	(5. Tcp Server 2)

closing socket '84'. 	28.1.2022 	18:44:49 	lx 	(5. Tcp Server 2)

*** tcp close for sock 85, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	18:44:49 	lx 	(5. Tcp Server 2)

closing socket '85'. 	28.1.2022 	18:44:49 	lx 	(5. Tcp Server 2)

 -- Server statistics --
answerCount:          5
poll.fd_count:        1
pollCount:            13160
pollInCount:          6
pollOutCount:         0
pollCloseCount:       0
pollErrCount:         0
fd add/remove count:  3/2
totalBytesReceived:   3286
totalBytesSent:       1571. 	28.1.2022 	18:44:49 	lx 	(5. Tcp Server 2)

warning: socket type 'number' is not a table, socket number: 86
. 	28.1.2022 	18:44:49 	lx 	(5. Tcp Server 2)

closing socket '86'. 	28.1.2022 	18:44:49 	lx 	(5. Tcp Server 2)

poll.expand_fds, free old fds: cdata<struct pollfd *>: 0x01249ddb00. 	28.1.2022 	18:44:49 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x01249ddb00, size: 400. 	28.1.2022 	18:44:49 	lx 	(5. Tcp Server 2)

--- server stopped ---. 	28.1.2022 	18:44:49 	lx 	(5. Tcp Server 2)

finalizer: free p1 	 cdata<void *>: 0x01249ddb00. 	28.1.2022 	18:44:49 	lx 	(5. Tcp Server 2)

Tcp server 2 stopped. 	28.1.2022 	18:44:49 	_lx_SERVER 	(5. Tcp Server 2)

Tcp server 2 starting. 	28.1.2022 	18:44:53 	_lx_SERVER 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/table/db_connection_preference.json'. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/auth/connection.json'. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

  database connect time: 0.0004 seconds. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

* connect: connection changed to 'postgre-demo/fi_demo'. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

* paths:
 - main: '/Users/pasi/nc/nc-server/'
 - bin : '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/bin/bin_osx_arm64/'
 - pref: '/Users/pasi/nc/nc-server/preference/'
 - 4D  : '/Users/pasi/4D/mg_v19/Manageri_v19/'
. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/table/prf/group.json'. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0121afd870, size: 400. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

********************* /Users/pasi/nc/nc-server/ *********************. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

port: 5949, arguments: '[
	5949
]', nc-server.json: '[]'. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

nc_server: debugLevel(0):0  port(5959):5949  closeConnection(0):0. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

1. Loading plugin: nc/worker/auth_worker. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

2. Loading plugin: nc/worker/query_worker. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

3. Loading plugin: nc/worker/query4d_worker. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

4. Loading plugin: nc/worker/call4d_worker. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

All plugins have been loaded. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

* cached preference files: demo-fi_demo-0 - system/option.json, demo-fi_demo-0 - system/4d.json, demo-fi_demo-0 - table/prf/field_type.json. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

* run in command line: 'ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}''. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

Mac address: f84d896921dc. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

TLS certificate files: /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/cert.pem, /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/privkey.pem. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

NC tcp server waiting on:  http://127.0.0.1:5949/,  http://192.168.32.2:5949/
                          https://127.0.0.1:5949/, https://192.168.32.2:5949/. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

NC udp server waiting on: 127.0.0.1:5949/, 192.168.32.2:5949/. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

--- server started in 0.0017 seconds, 2022-01-28 18:44:55, used memory 3005.1 kb --- 	 5. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

OSX arm64, using: rapidjson-arm, lfs-ffi. 	28.1.2022 	18:44:55 	lx 	(5. Tcp Server 2)

1. uri: HTTP, POST '/rest/nc/query/sql4d' 2022-01-28 18:45:03
'POST /rest/nc/query/sql4d HTTP/1.1
Content-Type: application/json
Connection: keep-alive
User-Agent: nc-rest-sql
Authorization: Basic ???
Content-Encoding: lz4
Accept-Encoding: lz4
Content-Length: 447
Content-Uncompressed-Length: 502

LZ4. 	28.1.2022 	18:45:03 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	18:45:03 	lx 	(5. Tcp Server 2)

    Connected to: 'Manageri v12 plg4d local, , database: plg4d, user: manage_demo'. 	28.1.2022 	18:45:03 	lx 	(5. Tcp Server 2)

  database connect time: 0.0001 seconds. 	28.1.2022 	18:45:03 	lx 	(5. Tcp Server 2)

* connect: connection changed from 'postgre-demo/fi_demo' to 'plg4d/plg4d'. 	28.1.2022 	18:45:03 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	18:45:03 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
 ["field"] = {
  [1] = "order_row-sales";
 };
 ["database"] = "plg4d";
 ["query_name"] = "new:";
 ["table_prefix"] = "ordr";
 ["return_type"] = "record array";
 ["local_field"] = {
  [1] = "order_row-sales";
 };
};. 	28.1.2022 	18:45:03 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	18:45:03 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:45:03 	lx 	(5. Tcp Server 2)

 1. answer time: 00:00:00.00104
  
SELECT COUNT(*)
 FROM sales_order_row sor
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'. 	28.1.2022 	18:45:03 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	18:45:03 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["database"] = "plg4d";
 ["query_name"] = "new:";
 ["return_type"] = "record array";
};. 	28.1.2022 	18:45:03 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	18:45:03 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:45:03 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	18:45:03 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order so\
 WHERE so.change_id > '20220128.171040.9f00j.so_  zzy0ae544bd03e1d06'";
 ["field"] = {
  [1] = "order-sales";
 };
 ["database"] = "plg4d";
 ["query_name"] = "new:";
 ["table_prefix"] = "ord";
 ["return_type"] = "record array";
 ["local_field"] = {
  [1] = "order-sales";
 };
};. 	28.1.2022 	18:45:03 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	18:45:03 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:45:03 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	18:45:04 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order";
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["database"] = "plg4d";
 ["query_name"] = "new:";
 ["return_type"] = "record array";
};. 	28.1.2022 	18:45:04 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	18:45:04 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:45:04 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	18:45:15 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field_type"] = {
  [1] = "string";
 };
 ["sql"] = "SELECT sor.record_id\
 FROM sales_order_row sor\
 WHERE sor.record_id IS NOT NULL\
 LIMIT 3";
 ["field"] = {
  [1] = "sor.record_id";
 };
 ["database"] = "plg4d";
 ["query_name"] = "new:dsql.sqlExecuteUnsafe";
 ["table_prefix"] = "ordr";
 ["return_type"] = "array table";
 ["local_field"] = {
  [1] = "ordr.record_id";
 };
};. 	28.1.2022 	18:45:15 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	18:45:15 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:45:15 	lx 	(5. Tcp Server 2)

*** tcp close for sock 87, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 702 bytes ***. 	28.1.2022 	18:46:42 	lx 	(5. Tcp Server 2)

closing socket '87'. 	28.1.2022 	18:46:42 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	18:46:45 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
 ["local_field"] = {
  [1] = "order_row-sales";
 };
 ["database"] = "plg4d";
 ["query_name"] = "new:";
 ["table_prefix"] = "ordr";
 ["return_type"] = "record array";
 ["field"] = {
  [1] = "order_row-sales";
 };
};. 	28.1.2022 	18:46:45 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	18:46:45 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:46:45 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	18:46:45 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["database"] = "plg4d";
 ["query_name"] = "new:";
 ["return_type"] = "record array";
};. 	28.1.2022 	18:46:45 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	18:46:45 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:46:45 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	18:46:46 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order so\
 WHERE so.change_id > '20220128.171040.9f00j.so_  zzy0ae544bd03e1d06'";
 ["local_field"] = {
  [1] = "order-sales";
 };
 ["database"] = "plg4d";
 ["query_name"] = "new:";
 ["table_prefix"] = "ord";
 ["return_type"] = "record array";
 ["field"] = {
  [1] = "order-sales";
 };
};. 	28.1.2022 	18:46:46 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	18:46:46 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:46:46 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	18:46:46 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order";
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["database"] = "plg4d";
 ["query_name"] = "new:";
 ["return_type"] = "record array";
};. 	28.1.2022 	18:46:46 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	18:46:46 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:46:46 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	18:48:12 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field_type"] = {
  [1] = "string";
 };
 ["sql"] = "SELECT sor.record_id\
 FROM sales_order_row sor\
 WHERE sor.record_id IS NOT NULL\
 LIMIT 3";
 ["local_field"] = {
  [1] = "ordr.record_id";
 };
 ["database"] = "plg4d";
 ["query_name"] = "new:dsql.sqlExecuteUnsafe";
 ["table_prefix"] = "ordr";
 ["return_type"] = "array table";
 ["field"] = {
  [1] = "sor.record_id";
 };
};. 	28.1.2022 	18:48:12 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	18:48:12 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:48:12 	lx 	(5. Tcp Server 2)

Starting to stop tcp server 2, max. delay 1,7 seconds... 	28.1.2022 	18:51:17 	_lx_SERVER 	(6. tbl_ 5)

*** tcp close for sock 85, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	18:51:17 	lx 	(5. Tcp Server 2)

closing socket '85'. 	28.1.2022 	18:51:17 	lx 	(5. Tcp Server 2)

*** tcp close for sock 86, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	18:51:17 	lx 	(5. Tcp Server 2)

closing socket '86'. 	28.1.2022 	18:51:17 	lx 	(5. Tcp Server 2)

 -- Server statistics --
answerCount:          10
poll.fd_count:        1
pollCount:            17088
pollInCount:          12
pollOutCount:         0
pollCloseCount:       1
pollErrCount:         0
fd add/remove count:  4/3
totalBytesReceived:   6688
totalBytesSent:       3140. 	28.1.2022 	18:51:17 	lx 	(5. Tcp Server 2)

warning: socket type 'number' is not a table, socket number: 87
. 	28.1.2022 	18:51:17 	lx 	(5. Tcp Server 2)

closing socket '87'. 	28.1.2022 	18:51:17 	lx 	(5. Tcp Server 2)

poll.expand_fds, free old fds: cdata<struct pollfd *>: 0x0121afd870. 	28.1.2022 	18:51:17 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0121afd870, size: 400. 	28.1.2022 	18:51:17 	lx 	(5. Tcp Server 2)

--- server stopped ---. 	28.1.2022 	18:51:17 	lx 	(5. Tcp Server 2)

finalizer: free p1 	 cdata<void *>: 0x0121afd870. 	28.1.2022 	18:51:17 	lx 	(5. Tcp Server 2)

Tcp server 2 stopped. 	28.1.2022 	18:51:17 	_lx_SERVER 	(5. Tcp Server 2)

Tcp server 2 is not running. 	28.1.2022 	18:51:45 	_lx_SERVER 	(6. tbl_ 5)

Tcp server 2 starting. 	28.1.2022 	18:51:47 	_lx_SERVER 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/table/db_connection_preference.json'. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/auth/connection.json'. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

  database connect time: 0.0003 seconds. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

* connect: connection changed to 'postgre-demo/fi_demo'. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

* paths:
 - main: '/Users/pasi/nc/nc-server/'
 - bin : '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/bin/bin_osx_arm64/'
 - pref: '/Users/pasi/nc/nc-server/preference/'
 - 4D  : '/Users/pasi/4D/mg_v19/Manageri_v19/'
. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/table/prf/group.json'. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0127f56410, size: 400. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

********************* /Users/pasi/nc/nc-server/ *********************. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

port: 5949, arguments: '[
	5949
]', nc-server.json: '[]'. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

nc_server: debugLevel(0):0  port(5959):5949  closeConnection(0):0. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

1. Loading plugin: nc/worker/auth_worker. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

2. Loading plugin: nc/worker/query_worker. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

3. Loading plugin: nc/worker/query4d_worker. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

4. Loading plugin: nc/worker/call4d_worker. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

All plugins have been loaded. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

* cached preference files: demo-fi_demo-0 - table/prf/field_type.json, demo-fi_demo-0 - system/4d.json, demo-fi_demo-0 - system/option.json. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

* run in command line: 'ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}''. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

Mac address: f84d896921dc. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

TLS certificate files: /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/cert.pem, /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/privkey.pem. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

NC tcp server waiting on:  http://127.0.0.1:5949/,  http://192.168.32.2:5949/
                          https://127.0.0.1:5949/, https://192.168.32.2:5949/. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

NC udp server waiting on: 127.0.0.1:5949/, 192.168.32.2:5949/. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

--- server started in 0.0018 seconds, 2022-01-28 18:51:49, used memory 3005.1 kb --- 	 5. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

OSX arm64, using: rapidjson-arm, lfs-ffi. 	28.1.2022 	18:51:49 	lx 	(5. Tcp Server 2)

1. uri: HTTP, POST '/rest/nc/query/sql4d' 2022-01-28 18:52:00
'POST /rest/nc/query/sql4d HTTP/1.1
Content-Type: application/json
Connection: keep-alive
User-Agent: nc-rest-sql
Authorization: Basic ???
Content-Encoding: lz4
Accept-Encoding: lz4
Content-Length: 439
Content-Uncompressed-Length: 502

LZ4. 	28.1.2022 	18:52:00 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	18:52:00 	lx 	(5. Tcp Server 2)

    Connected to: 'Manageri v12 plg4d local, , database: plg4d, user: manage_demo'. 	28.1.2022 	18:52:00 	lx 	(5. Tcp Server 2)

  database connect time: 0.0001 seconds. 	28.1.2022 	18:52:00 	lx 	(5. Tcp Server 2)

* connect: connection changed from 'postgre-demo/fi_demo' to 'plg4d/plg4d'. 	28.1.2022 	18:52:00 	lx 	(5. Tcp Server 2)

querySql4d() param = {
 ["table_prefix"] = "ordr";
 ["local_field"] = {
  [1] = "order_row-sales";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
 ["field"] = {
  [1] = "order_row-sales";
 };
 ["return_type"] = "record array";
 ["query_name"] = "new:";
};. 	28.1.2022 	18:52:00 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	18:52:00 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["local_field"] = {
  [1] = "order_row-sales";
 };
 ["return_type"] = "record array";
 ["table_prefix"] = "ordr";
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
 ["field"] = {
  [1] = "order_row-sales";
 };
 ["database"] = "plg4d";
 ["query_name"] = "new:";
};. 	28.1.2022 	18:52:00 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	18:52:00 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:52:00 	lx 	(5. Tcp Server 2)

 1. answer time: 00:00:00.00101
  
SELECT COUNT(*)
 FROM sales_order_row sor
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'. 	28.1.2022 	18:52:00 	lx 	(5. Tcp Server 2)

querySql4d() param = {
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["return_type"] = "record array";
 ["query_name"] = "new:";
};. 	28.1.2022 	18:52:00 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	18:52:00 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field_type"] = {
  [1] = "integer";
 };
 ["return_type"] = "record array";
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["database"] = "plg4d";
 ["query_name"] = "new:";
};. 	28.1.2022 	18:52:00 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	18:52:00 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:52:00 	lx 	(5. Tcp Server 2)

querySql4d() param = {
 ["table_prefix"] = "ord";
 ["local_field"] = {
  [1] = "order-sales";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order so\
 WHERE so.change_id > '20220128.171040.9f00j.so_  zzy0ae544bd03e1d06'";
 ["field"] = {
  [1] = "order-sales";
 };
 ["return_type"] = "record array";
 ["query_name"] = "new:";
};. 	28.1.2022 	18:52:01 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	18:52:01 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["local_field"] = {
  [1] = "order-sales";
 };
 ["return_type"] = "record array";
 ["table_prefix"] = "ord";
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order so\
 WHERE so.change_id > '20220128.171040.9f00j.so_  zzy0ae544bd03e1d06'";
 ["field"] = {
  [1] = "order-sales";
 };
 ["database"] = "plg4d";
 ["query_name"] = "new:";
};. 	28.1.2022 	18:52:01 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	18:52:01 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:52:01 	lx 	(5. Tcp Server 2)

querySql4d() param = {
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order";
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["return_type"] = "record array";
 ["query_name"] = "new:";
};. 	28.1.2022 	18:52:01 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	18:52:01 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["field_type"] = {
  [1] = "integer";
 };
 ["return_type"] = "record array";
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order";
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["database"] = "plg4d";
 ["query_name"] = "new:";
};. 	28.1.2022 	18:52:01 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	18:52:01 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:52:01 	lx 	(5. Tcp Server 2)

querySql4d() param = {
 ["table_prefix"] = "ordr";
 ["local_field"] = {
  [1] = "ordr.record_id";
 };
 ["field_type"] = {
  [1] = "string";
 };
 ["sql"] = "SELECT sor.record_id\
 FROM sales_order_row sor\
 WHERE sor.record_id IS NOT NULL\
 LIMIT 3";
 ["field"] = {
  [1] = "sor.record_id";
 };
 ["return_type"] = "array table";
 ["query_name"] = "new:dsql.sqlExecuteUnsafe";
};. 	28.1.2022 	18:52:06 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	18:52:06 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["local_field"] = {
  [1] = "ordr.record_id";
 };
 ["return_type"] = "array table";
 ["table_prefix"] = "ordr";
 ["field_type"] = {
  [1] = "string";
 };
 ["sql"] = "SELECT sor.record_id\
 FROM sales_order_row sor\
 WHERE sor.record_id IS NOT NULL\
 LIMIT 3";
 ["field"] = {
  [1] = "sor.record_id";
 };
 ["database"] = "plg4d";
 ["query_name"] = "new:dsql.sqlExecuteUnsafe";
};. 	28.1.2022 	18:52:06 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	18:52:06 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	18:52:06 	lx 	(5. Tcp Server 2)

*** tcp close for sock 88, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 696 bytes ***. 	28.1.2022 	19:03:14 	lx 	(5. Tcp Server 2)

closing socket '88'. 	28.1.2022 	19:03:14 	lx 	(5. Tcp Server 2)

Starting to stop tcp server 2, max. delay 1,7 seconds... 	28.1.2022 	19:03:17 	_lx_SERVER 	(6. tbl_ 5)

*** tcp close for sock 86, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	19:03:18 	lx 	(5. Tcp Server 2)

closing socket '86'. 	28.1.2022 	19:03:18 	lx 	(5. Tcp Server 2)

*** tcp close for sock 87, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	19:03:18 	lx 	(5. Tcp Server 2)

closing socket '87'. 	28.1.2022 	19:03:18 	lx 	(5. Tcp Server 2)

 -- Server statistics --
answerCount:          5
poll.fd_count:        0
pollCount:            30736
pollInCount:          6
pollOutCount:         0
pollCloseCount:       1
pollErrCount:         0
fd add/remove count:  3/3
totalBytesReceived:   3321
totalBytesSent:       1570. 	28.1.2022 	19:03:18 	lx 	(5. Tcp Server 2)

--- server stopped ---. 	28.1.2022 	19:03:18 	lx 	(5. Tcp Server 2)

finalizer: free p1 	 cdata<void *>: 0x0127f56410. 	28.1.2022 	19:03:18 	lx 	(5. Tcp Server 2)

Tcp server 2 stopped. 	28.1.2022 	19:03:18 	_lx_SERVER 	(5. Tcp Server 2)

Tcp server 2 starting. 	28.1.2022 	19:03:23 	_lx_SERVER 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/table/db_connection_preference.json'. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/auth/connection.json'. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

  database connect time: 0.0003 seconds. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

* connect: connection changed to 'postgre-demo/fi_demo'. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

* paths:
 - main: '/Users/pasi/nc/nc-server/'
 - bin : '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/bin/bin_osx_arm64/'
 - pref: '/Users/pasi/nc/nc-server/preference/'
 - 4D  : '/Users/pasi/4D/mg_v19/Manageri_v19/'
. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/table/prf/group.json'. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x01249d63f0, size: 400. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

********************* /Users/pasi/nc/nc-server/ *********************. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

port: 5949, arguments: '[
	5949
]', nc-server.json: '[]'. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

nc_server: debugLevel(0):0  port(5959):5949  closeConnection(0):0. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

1. Loading plugin: nc/worker/auth_worker. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

2. Loading plugin: nc/worker/query_worker. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

3. Loading plugin: nc/worker/query4d_worker. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

4. Loading plugin: nc/worker/call4d_worker. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

All plugins have been loaded. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

* cached preference files: demo-fi_demo-0 - system/4d.json, demo-fi_demo-0 - system/option.json, demo-fi_demo-0 - table/prf/field_type.json. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

* run in command line: 'ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}''. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

Mac address: f84d896921dc. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

TLS certificate files: /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/cert.pem, /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/privkey.pem. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

NC tcp server waiting on:  http://127.0.0.1:5949/,  http://192.168.32.2:5949/
                          https://127.0.0.1:5949/, https://192.168.32.2:5949/. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

NC udp server waiting on: 127.0.0.1:5949/, 192.168.32.2:5949/. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

--- server started in 0.0019 seconds, 2022-01-28 19:03:25, used memory 3004.7 kb --- 	 5. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

OSX arm64, using: rapidjson-arm, lfs-ffi. 	28.1.2022 	19:03:25 	lx 	(5. Tcp Server 2)

1. uri: HTTP, POST '/rest/nc/query/sql4d' 2022-01-28 19:03:27
'POST /rest/nc/query/sql4d HTTP/1.1
Content-Type: application/json
Connection: keep-alive
User-Agent: nc-rest-sql
Authorization: Basic ???
Content-Encoding: lz4
Accept-Encoding: lz4
Content-Length: 445
Content-Uncompressed-Length: 502

LZ4. 	28.1.2022 	19:03:27 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	19:03:27 	lx 	(5. Tcp Server 2)

    Connected to: 'Manageri v12 plg4d local, , database: plg4d, user: manage_demo'. 	28.1.2022 	19:03:27 	lx 	(5. Tcp Server 2)

  database connect time: 0.0002 seconds. 	28.1.2022 	19:03:27 	lx 	(5. Tcp Server 2)

* connect: connection changed from 'postgre-demo/fi_demo' to 'plg4d/plg4d'. 	28.1.2022 	19:03:27 	lx 	(5. Tcp Server 2)

querySql4d() param = {
 ["table_prefix"] = "ordr";
 ["local_field"] = {
  [1] = "order_row-sales";
 };
 ["query_name"] = "new:";
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
 ["field"] = {
  [1] = "order_row-sales";
 };
 ["return_type"] = "record array";
};. 	28.1.2022 	19:03:27 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	19:03:27 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["local_field"] = {
  [1] = "order_row-sales";
 };
 ["database"] = "plg4d";
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
 ["field"] = {
  [1] = "order_row-sales";
 };
 ["table_prefix"] = "ordr";
 ["query_name"] = "new:";
 ["return_type"] = "record array";
};. 	28.1.2022 	19:03:27 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	19:03:27 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	19:03:27 	lx 	(5. Tcp Server 2)

warning: selection[order_row-sales] does not exist
. 	28.1.2022 	19:03:27 	lx 	(5. Tcp Server 2)

 1. answer time: 00:00:00.00091
  
SELECT COUNT(*)
 FROM sales_order_row sor
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'. 	28.1.2022 	19:03:27 	lx 	(5. Tcp Server 2)

querySql4d() param = {
 ["query_name"] = "new:";
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["return_type"] = "record array";
};. 	28.1.2022 	19:03:27 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	19:03:27 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["query_name"] = "new:";
 ["database"] = "plg4d";
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["return_type"] = "record array";
};. 	28.1.2022 	19:03:27 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	19:03:27 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	19:03:27 	lx 	(5. Tcp Server 2)

warning: selection[COUNT(*)] does not exist
. 	28.1.2022 	19:03:27 	lx 	(5. Tcp Server 2)

querySql4d() param = {
 ["table_prefix"] = "ordr";
 ["local_field"] = {
  [1] = "order_row-sales";
 };
 ["query_name"] = "new:";
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
 ["field"] = {
  [1] = "order_row-sales";
 };
 ["return_type"] = "record array";
};. 	28.1.2022 	19:04:28 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	19:04:28 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["local_field"] = {
  [1] = "order_row-sales";
 };
 ["database"] = "plg4d";
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
 ["field"] = {
  [1] = "order_row-sales";
 };
 ["table_prefix"] = "ordr";
 ["query_name"] = "new:";
 ["return_type"] = "record array";
};. 	28.1.2022 	19:04:28 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	19:04:28 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	19:04:28 	lx 	(5. Tcp Server 2)

warning: selection[order_row-sales] does not exist
. 	28.1.2022 	19:04:28 	lx 	(5. Tcp Server 2)

querySql4d() param = {
 ["query_name"] = "new:";
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["return_type"] = "record array";
};. 	28.1.2022 	19:04:28 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	19:04:28 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["query_name"] = "new:";
 ["database"] = "plg4d";
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["return_type"] = "record array";
};. 	28.1.2022 	19:04:28 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	19:04:28 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	19:04:28 	lx 	(5. Tcp Server 2)

warning: selection[COUNT(*)] does not exist
. 	28.1.2022 	19:04:28 	lx 	(5. Tcp Server 2)

querySql4d() param = {
 ["table_prefix"] = "ordr";
 ["local_field"] = {
  [1] = "order_row-sales";
 };
 ["query_name"] = "new:";
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
 ["field"] = {
  [1] = "order_row-sales";
 };
 ["return_type"] = "record array";
};. 	28.1.2022 	19:05:28 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	19:05:28 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["local_field"] = {
  [1] = "order_row-sales";
 };
 ["database"] = "plg4d";
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
 ["field"] = {
  [1] = "order_row-sales";
 };
 ["table_prefix"] = "ordr";
 ["query_name"] = "new:";
 ["return_type"] = "record array";
};. 	28.1.2022 	19:05:28 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	19:05:28 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	19:05:28 	lx 	(5. Tcp Server 2)

warning: selection[order_row-sales] does not exist
. 	28.1.2022 	19:05:28 	lx 	(5. Tcp Server 2)

querySql4d() param = {
 ["query_name"] = "new:";
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["return_type"] = "record array";
};. 	28.1.2022 	19:05:28 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	19:05:28 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["query_name"] = "new:";
 ["database"] = "plg4d";
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["return_type"] = "record array";
};. 	28.1.2022 	19:05:28 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	19:05:28 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	19:05:28 	lx 	(5. Tcp Server 2)

warning: selection[COUNT(*)] does not exist
. 	28.1.2022 	19:05:28 	lx 	(5. Tcp Server 2)

*** tcp close for sock 89, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 611 bytes ***. 	28.1.2022 	19:06:03 	lx 	(5. Tcp Server 2)

closing socket '89'. 	28.1.2022 	19:06:03 	lx 	(5. Tcp Server 2)

*** tcp close for sock 89, type 'nil', protocol 'nil', reason: 'POLLHUP', request length: (no request) bytes ***. 	28.1.2022 	19:08:30 	lx 	(5. Tcp Server 2)

closing socket '89'. 	28.1.2022 	19:08:30 	lx 	(5. Tcp Server 2)

Starting to stop tcp server 2, max. delay 1,7 seconds... 	28.1.2022 	19:08:35 	_lx_SERVER 	(6. tbl_ 5)

*** tcp close for sock 87, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	19:08:36 	lx 	(5. Tcp Server 2)

closing socket '87'. 	28.1.2022 	19:08:36 	lx 	(5. Tcp Server 2)

*** tcp close for sock 88, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	19:08:36 	lx 	(5. Tcp Server 2)

closing socket '88'. 	28.1.2022 	19:08:36 	lx 	(5. Tcp Server 2)

 -- Server statistics --
answerCount:          6
poll.fd_count:        0
pollCount:            13976
pollInCount:          8
pollOutCount:         0
pollCloseCount:       2
pollErrCount:         0
fd add/remove count:  4/4
totalBytesReceived:   3978
totalBytesSent:       1600. 	28.1.2022 	19:08:36 	lx 	(5. Tcp Server 2)

--- server stopped ---. 	28.1.2022 	19:08:36 	lx 	(5. Tcp Server 2)

finalizer: free p1 	 cdata<void *>: 0x01249d63f0. 	28.1.2022 	19:08:36 	lx 	(5. Tcp Server 2)

Tcp server 2 stopped. 	28.1.2022 	19:08:36 	_lx_SERVER 	(5. Tcp Server 2)

Tcp server 2 starting. 	28.1.2022 	19:08:40 	_lx_SERVER 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	19:08:41 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/table/db_connection_preference.json'. 	28.1.2022 	19:08:41 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/auth/connection.json'. 	28.1.2022 	19:08:41 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	19:08:41 	lx 	(5. Tcp Server 2)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	28.1.2022 	19:08:41 	lx 	(5. Tcp Server 2)

  database connect time: 0.0003 seconds. 	28.1.2022 	19:08:41 	lx 	(5. Tcp Server 2)

* connect: connection changed to 'postgre-demo/fi_demo'. 	28.1.2022 	19:08:41 	lx 	(5. Tcp Server 2)

* paths:
 - main: '/Users/pasi/nc/nc-server/'
 - bin : '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/bin/bin_osx_arm64/'
 - pref: '/Users/pasi/nc/nc-server/preference/'
 - 4D  : '/Users/pasi/4D/mg_v19/Manageri_v19/'
. 	28.1.2022 	19:08:41 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/table/prf/group.json'. 	28.1.2022 	19:08:41 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0124836aa0, size: 400. 	28.1.2022 	19:08:42 	lx 	(5. Tcp Server 2)

********************* /Users/pasi/nc/nc-server/ *********************. 	28.1.2022 	19:08:42 	lx 	(5. Tcp Server 2)

port: 5949, arguments: '[
	5949
]', nc-server.json: '[]'. 	28.1.2022 	19:08:42 	lx 	(5. Tcp Server 2)

nc_server: debugLevel(0):0  port(5959):5949  closeConnection(0):0. 	28.1.2022 	19:08:42 	lx 	(5. Tcp Server 2)

1. Loading plugin: nc/worker/auth_worker. 	28.1.2022 	19:08:42 	lx 	(5. Tcp Server 2)

2. Loading plugin: nc/worker/query_worker. 	28.1.2022 	19:08:42 	lx 	(5. Tcp Server 2)

3. Loading plugin: nc/worker/query4d_worker. 	28.1.2022 	19:08:42 	lx 	(5. Tcp Server 2)

4. Loading plugin: nc/worker/call4d_worker. 	28.1.2022 	19:08:42 	lx 	(5. Tcp Server 2)

All plugins have been loaded. 	28.1.2022 	19:08:42 	lx 	(5. Tcp Server 2)

* cached preference files: demo-fi_demo-0 - table/prf/field_type.json, demo-fi_demo-0 - system/option.json, demo-fi_demo-0 - system/4d.json. 	28.1.2022 	19:08:42 	lx 	(5. Tcp Server 2)

* run in command line: 'ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}''. 	28.1.2022 	19:08:42 	lx 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	19:08:42 	lx 	(5. Tcp Server 2)

Mac address: f84d896921dc. 	28.1.2022 	19:08:42 	lx 	(5. Tcp Server 2)

TLS certificate files: /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/cert.pem, /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/privkey.pem. 	28.1.2022 	19:08:42 	lx 	(5. Tcp Server 2)

NC tcp server waiting on:  http://127.0.0.1:5949/,  http://192.168.32.2:5949/
                          https://127.0.0.1:5949/, https://192.168.32.2:5949/. 	28.1.2022 	19:08:42 	lx 	(5. Tcp Server 2)

NC udp server waiting on: 127.0.0.1:5949/, 192.168.32.2:5949/. 	28.1.2022 	19:08:42 	lx 	(5. Tcp Server 2)

--- server started in 0.0019 seconds, 2022-01-28 19:08:42, used memory 3004.6 kb --- 	 5. 	28.1.2022 	19:08:42 	lx 	(5. Tcp Server 2)

OSX arm64, using: rapidjson-arm, lfs-ffi. 	28.1.2022 	19:08:42 	lx 	(5. Tcp Server 2)

1. uri: HTTP, POST '/rest/nc/query/sql4d' 2022-01-28 19:08:51
'POST /rest/nc/query/sql4d HTTP/1.1
Content-Type: application/json
Connection: keep-alive
User-Agent: nc-rest-sql
Authorization: Basic ???
Content-Encoding: lz4
Accept-Encoding: lz4
Content-Length: 433
Content-Uncompressed-Length: 502

LZ4. 	28.1.2022 	19:08:51 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	19:08:51 	lx 	(5. Tcp Server 2)

    Connected to: 'Manageri v12 plg4d local, , database: plg4d, user: manage_demo'. 	28.1.2022 	19:08:51 	lx 	(5. Tcp Server 2)

  database connect time: 0.0001 seconds. 	28.1.2022 	19:08:51 	lx 	(5. Tcp Server 2)

* connect: connection changed from 'postgre-demo/fi_demo' to 'plg4d/plg4d'. 	28.1.2022 	19:08:51 	lx 	(5. Tcp Server 2)

querySql4d() param = {
 ["table_prefix"] = "ordr";
 ["local_field"] = {
  [1] = "order_row-sales";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
 ["field"] = {
  [1] = "order_row-sales";
 };
 ["return_type"] = "record array";
 ["query_name"] = "new:";
};. 	28.1.2022 	19:08:51 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	19:08:51 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["database"] = "plg4d";
 ["table_prefix"] = "ordr";
 ["return_type"] = "record array";
 ["local_field"] = {
  [1] = "order_row-sales";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
 ["field"] = {
  [1] = "order_row-sales";
 };
 ["query_name"] = "new:";
};. 	28.1.2022 	19:08:51 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	19:08:51 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	19:08:51 	lx 	(5. Tcp Server 2)

 1. answer time: 00:00:00.00075
  
SELECT COUNT(*)
 FROM sales_order_row sor
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'. 	28.1.2022 	19:08:51 	lx 	(5. Tcp Server 2)

querySql4d() param = {
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["return_type"] = "record array";
 ["query_name"] = "new:";
};. 	28.1.2022 	19:09:13 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	19:09:13 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["database"] = "plg4d";
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["return_type"] = "record array";
 ["query_name"] = "new:";
};. 	28.1.2022 	19:09:13 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	19:09:13 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	19:09:13 	lx 	(5. Tcp Server 2)

querySql4d() param = {
 ["table_prefix"] = "ord";
 ["local_field"] = {
  [1] = "order-sales";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order so\
 WHERE so.change_id > '20220128.171040.9f00j.so_  zzy0ae544bd03e1d06'";
 ["field"] = {
  [1] = "order-sales";
 };
 ["return_type"] = "record array";
 ["query_name"] = "new:";
};. 	28.1.2022 	19:09:13 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	19:09:13 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["database"] = "plg4d";
 ["table_prefix"] = "ord";
 ["return_type"] = "record array";
 ["local_field"] = {
  [1] = "order-sales";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order so\
 WHERE so.change_id > '20220128.171040.9f00j.so_  zzy0ae544bd03e1d06'";
 ["field"] = {
  [1] = "order-sales";
 };
 ["query_name"] = "new:";
};. 	28.1.2022 	19:09:13 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	19:09:13 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	19:09:13 	lx 	(5. Tcp Server 2)

querySql4d() param = {
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order";
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["return_type"] = "record array";
 ["query_name"] = "new:";
};. 	28.1.2022 	19:09:13 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'record array'. 	28.1.2022 	19:09:13 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["database"] = "plg4d";
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order";
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["return_type"] = "record array";
 ["query_name"] = "new:";
};. 	28.1.2022 	19:09:13 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: record array. 	28.1.2022 	19:09:13 	lx 	(5. Tcp Server 2)

'record array' returnType - plg4d array4dToArrayTable. 	28.1.2022 	19:09:13 	lx 	(5. Tcp Server 2)

querySql4d() param = {
 ["table_prefix"] = "ordr";
 ["local_field"] = {
  [1] = "ordr.record_id";
 };
 ["field_type"] = {
  [1] = "string";
 };
 ["sql"] = "SELECT sor.record_id\
 FROM sales_order_row sor\
 WHERE sor.record_id IS NOT NULL\
 LIMIT 3";
 ["field"] = {
  [1] = "sor.record_id";
 };
 ["return_type"] = "array table";
 ["query_name"] = "new:dsql.sqlExecuteUnsafe";
};. 	28.1.2022 	19:09:23 	lx 	(5. Tcp Server 2)

sqlExecuteUnsafeArray, returnTableType: 'array table'. 	28.1.2022 	19:09:23 	lx 	(5. Tcp Server 2)

option - plg4d selectionToArrayTable = {
 ["database"] = "plg4d";
 ["table_prefix"] = "ordr";
 ["return_type"] = "array table";
 ["local_field"] = {
  [1] = "ordr.record_id";
 };
 ["field_type"] = {
  [1] = "string";
 };
 ["sql"] = "SELECT sor.record_id\
 FROM sales_order_row sor\
 WHERE sor.record_id IS NOT NULL\
 LIMIT 3";
 ["field"] = {
  [1] = "sor.record_id";
 };
 ["query_name"] = "new:dsql.sqlExecuteUnsafe";
};. 	28.1.2022 	19:09:23 	lx 	(5. Tcp Server 2)

plg4d selectionToArrayTable, returnType: nil. 	28.1.2022 	19:09:23 	lx 	(5. Tcp Server 2)

'nil' returnType - plg4d array4dToArrayTable. 	28.1.2022 	19:09:23 	lx 	(5. Tcp Server 2)

Starting to stop tcp server 2, max. delay 1,7 seconds... 	28.1.2022 	19:10:28 	_lx_SERVER 	(6. tbl_ 5)

*** tcp close for sock 88, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	19:10:28 	lx 	(5. Tcp Server 2)

closing socket '88'. 	28.1.2022 	19:10:28 	lx 	(5. Tcp Server 2)

*** tcp close for sock 89, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	19:10:28 	lx 	(5. Tcp Server 2)

closing socket '89'. 	28.1.2022 	19:10:28 	lx 	(5. Tcp Server 2)

 -- Server statistics --
answerCount:          5
poll.fd_count:        1
pollCount:            4800
pollInCount:          6
pollOutCount:         0
pollCloseCount:       0
pollErrCount:         0
fd add/remove count:  3/2
totalBytesReceived:   3297
totalBytesSent:       1514. 	28.1.2022 	19:10:28 	lx 	(5. Tcp Server 2)

warning: socket type 'number' is not a table, socket number: 90
. 	28.1.2022 	19:10:28 	lx 	(5. Tcp Server 2)

closing socket '90'. 	28.1.2022 	19:10:28 	lx 	(5. Tcp Server 2)

poll.expand_fds, free old fds: cdata<struct pollfd *>: 0x0124836aa0. 	28.1.2022 	19:10:28 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0124836aa0, size: 400. 	28.1.2022 	19:10:28 	lx 	(5. Tcp Server 2)

--- server stopped ---. 	28.1.2022 	19:10:28 	lx 	(5. Tcp Server 2)

finalizer: free p1 	 cdata<void *>: 0x0124836aa0. 	28.1.2022 	19:10:28 	lx 	(5. Tcp Server 2)

Tcp server 2 stopped. 	28.1.2022 	19:10:28 	_lx_SERVER 	(5. Tcp Server 2)

Tcp server 2 starting. 	28.1.2022 	19:10:32 	_lx_SERVER 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/table/db_connection_preference.json'. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/auth/connection.json'. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

  database connect time: 0.0003 seconds. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

* connect: connection changed to 'postgre-demo/fi_demo'. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

* paths:
 - main: '/Users/pasi/nc/nc-server/'
 - bin : '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/bin/bin_osx_arm64/'
 - pref: '/Users/pasi/nc/nc-server/preference/'
 - 4D  : '/Users/pasi/4D/mg_v19/Manageri_v19/'
. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/table/prf/group.json'. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0121ad61b0, size: 400. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

********************* /Users/pasi/nc/nc-server/ *********************. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

port: 5949, arguments: '[
	5949
]', nc-server.json: '[]'. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

nc_server: debugLevel(0):0  port(5959):5949  closeConnection(0):0. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

1. Loading plugin: nc/worker/auth_worker. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

2. Loading plugin: nc/worker/query_worker. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

3. Loading plugin: nc/worker/query4d_worker. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

4. Loading plugin: nc/worker/call4d_worker. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

All plugins have been loaded. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

* cached preference files: demo-fi_demo-0 - system/option.json, demo-fi_demo-0 - system/4d.json, demo-fi_demo-0 - table/prf/field_type.json. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

* run in command line: 'ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}''. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

Mac address: f84d896921dc. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

TLS certificate files: /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/cert.pem, /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/privkey.pem. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

NC tcp server waiting on:  http://127.0.0.1:5949/,  http://192.168.32.2:5949/
                          https://127.0.0.1:5949/, https://192.168.32.2:5949/. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

NC udp server waiting on: 127.0.0.1:5949/, 192.168.32.2:5949/. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

--- server started in 0.0015 seconds, 2022-01-28 19:10:34, used memory 3004.0 kb --- 	 5. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

OSX arm64, using: rapidjson-arm, lfs-ffi. 	28.1.2022 	19:10:34 	lx 	(5. Tcp Server 2)

1. uri: HTTP, POST '/rest/nc/query/sql4d' 2022-01-28 19:10:43
'POST /rest/nc/query/sql4d HTTP/1.1
Content-Type: application/json
Connection: keep-alive
User-Agent: nc-rest-sql
Authorization: Basic ???
Content-Encoding: lz4
Accept-Encoding: lz4
Content-Length: 447
Content-Uncompressed-Length: 502

LZ4. 	28.1.2022 	19:10:43 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	19:10:43 	lx 	(5. Tcp Server 2)

    Connected to: 'Manageri v12 plg4d local, , database: plg4d, user: manage_demo'. 	28.1.2022 	19:10:43 	lx 	(5. Tcp Server 2)

  database connect time: 0.0002 seconds. 	28.1.2022 	19:10:43 	lx 	(5. Tcp Server 2)

* connect: connection changed from 'postgre-demo/fi_demo' to 'plg4d/plg4d'. 	28.1.2022 	19:10:43 	lx 	(5. Tcp Server 2)

querySql4d() param = {
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order_row sor\
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'";
 ["local_field"] = {
  [1] = "order_row-sales";
 };
 ["table_prefix"] = "ordr";
 ["return_type"] = "record array";
 ["field"] = {
  [1] = "order_row-sales";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["query_name"] = "new:";
};. 	28.1.2022 	19:10:43 	lx 	(5. Tcp Server 2)

 1. answer time: 00:00:00.00082
  
SELECT COUNT(*)
 FROM sales_order_row sor
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'. 	28.1.2022 	19:10:43 	lx 	(5. Tcp Server 2)

querySql4d() param = {
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["return_type"] = "record array";
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order_row";
 ["query_name"] = "new:";
};. 	28.1.2022 	19:10:43 	lx 	(5. Tcp Server 2)

querySql4d() param = {
 ["sql"] = "SELECT COUNT(*)\
 FROM sales_order so\
 WHERE so.change_id > '20220128.171040.9f00j.so_  zzy0ae544bd03e1d06'";
 ["local_field"] = {
  [1] = "order-sales";
 };
 ["table_prefix"] = "ord";
 ["return_type"] = "record array";
 ["field"] = {
  [1] = "order-sales";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["query_name"] = "new:";
};. 	28.1.2022 	19:10:43 	lx 	(5. Tcp Server 2)

querySql4d() param = {
 ["local_field"] = {
  [1] = "COUNT(*)";
 };
 ["field_type"] = {
  [1] = "integer";
 };
 ["return_type"] = "record array";
 ["field"] = {
  [1] = "COUNT(*)";
 };
 ["sql"] = "SELECT COUNT(*) FROM sales_order";
 ["query_name"] = "new:";
};. 	28.1.2022 	19:10:43 	lx 	(5. Tcp Server 2)

Starting to stop tcp server 2, max. delay 1,7 seconds... 	28.1.2022 	19:11:05 	_lx_SERVER 	(6. tbl_ 5)

*** tcp close for sock 89, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	19:11:05 	lx 	(5. Tcp Server 2)

closing socket '89'. 	28.1.2022 	19:11:05 	lx 	(5. Tcp Server 2)

*** tcp close for sock 90, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	19:11:05 	lx 	(5. Tcp Server 2)

closing socket '90'. 	28.1.2022 	19:11:05 	lx 	(5. Tcp Server 2)

 -- Server statistics --
answerCount:          4
poll.fd_count:        1
pollCount:            1368
pollInCount:          5
pollOutCount:         0
pollCloseCount:       0
pollErrCount:         0
fd add/remove count:  3/2
totalBytesReceived:   2647
totalBytesSent:       1120. 	28.1.2022 	19:11:05 	lx 	(5. Tcp Server 2)

warning: socket type 'number' is not a table, socket number: 91
. 	28.1.2022 	19:11:05 	lx 	(5. Tcp Server 2)

closing socket '91'. 	28.1.2022 	19:11:05 	lx 	(5. Tcp Server 2)

poll.expand_fds, free old fds: cdata<struct pollfd *>: 0x0121ad61b0. 	28.1.2022 	19:11:05 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x0121ad61b0, size: 400. 	28.1.2022 	19:11:05 	lx 	(5. Tcp Server 2)

--- server stopped ---. 	28.1.2022 	19:11:05 	lx 	(5. Tcp Server 2)

finalizer: free p1 	 cdata<void *>: 0x0121ad61b0. 	28.1.2022 	19:11:05 	lx 	(5. Tcp Server 2)

Tcp server 2 stopped. 	28.1.2022 	19:11:05 	_lx_SERVER 	(5. Tcp Server 2)

Tcp server 2 starting. 	28.1.2022 	19:11:15 	_lx_SERVER 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	19:11:16 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/table/db_connection_preference.json'. 	28.1.2022 	19:11:16 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/auth/connection.json'. 	28.1.2022 	19:11:16 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	19:11:16 	lx 	(5. Tcp Server 2)

    Connected to: 'postgre local socket, /tmp, database: fi_demo, user: manage_demo'. 	28.1.2022 	19:11:16 	lx 	(5. Tcp Server 2)

  database connect time: 0.0003 seconds. 	28.1.2022 	19:11:16 	lx 	(5. Tcp Server 2)

* connect: connection changed to 'postgre-demo/fi_demo'. 	28.1.2022 	19:11:16 	lx 	(5. Tcp Server 2)

* paths:
 - main: '/Users/pasi/nc/nc-server/'
 - bin : '/Users/pasi/4D/mg_v19/Manageri_v19/Resources/bin/bin_osx_arm64/'
 - pref: '/Users/pasi/nc/nc-server/preference/'
 - 4D  : '/Users/pasi/4D/mg_v19/Manageri_v19/'
. 	28.1.2022 	19:11:16 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/preference/table/prf/group.json'. 	28.1.2022 	19:11:16 	lx 	(5. Tcp Server 2)

poll.expand_fds: 50, old fds: nil, new fds: cdata<struct pollfd *>: 0x012457e9c0, size: 400. 	28.1.2022 	19:11:17 	lx 	(5. Tcp Server 2)

********************* /Users/pasi/nc/nc-server/ *********************. 	28.1.2022 	19:11:17 	lx 	(5. Tcp Server 2)

port: 5949, arguments: '[
	5949
]', nc-server.json: '[]'. 	28.1.2022 	19:11:17 	lx 	(5. Tcp Server 2)

nc_server: debugLevel(0):0  port(5959):5949  closeConnection(0):0. 	28.1.2022 	19:11:17 	lx 	(5. Tcp Server 2)

1. Loading plugin: nc/worker/auth_worker. 	28.1.2022 	19:11:17 	lx 	(5. Tcp Server 2)

2. Loading plugin: nc/worker/query_worker. 	28.1.2022 	19:11:17 	lx 	(5. Tcp Server 2)

3. Loading plugin: nc/worker/query4d_worker. 	28.1.2022 	19:11:17 	lx 	(5. Tcp Server 2)

4. Loading plugin: nc/worker/call4d_worker. 	28.1.2022 	19:11:17 	lx 	(5. Tcp Server 2)

All plugins have been loaded. 	28.1.2022 	19:11:17 	lx 	(5. Tcp Server 2)

* cached preference files: demo-fi_demo-0 - system/option.json, demo-fi_demo-0 - table/prf/field_type.json, demo-fi_demo-0 - system/4d.json. 	28.1.2022 	19:11:17 	lx 	(5. Tcp Server 2)

* run in command line: 'ifconfig | grep -E 'inet.[0-9]' | grep -v '127.0.0.1' | awk '{ print $2}''. 	28.1.2022 	19:11:17 	lx 	(5. Tcp Server 2)

* run in command line: 'LC_ALL=C ifconfig en0 | awk '/ether/{print $2}''. 	28.1.2022 	19:11:17 	lx 	(5. Tcp Server 2)

Mac address: f84d896921dc. 	28.1.2022 	19:11:17 	lx 	(5. Tcp Server 2)

TLS certificate files: /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/cert.pem, /Users/pasi/4D/mg_v19/Manageri_v19/Resources/Lua/preference/cert/privkey.pem. 	28.1.2022 	19:11:17 	lx 	(5. Tcp Server 2)

NC tcp server waiting on:  http://127.0.0.1:5949/,  http://192.168.32.2:5949/
                          https://127.0.0.1:5949/, https://192.168.32.2:5949/. 	28.1.2022 	19:11:17 	lx 	(5. Tcp Server 2)

NC udp server waiting on: 127.0.0.1:5949/, 192.168.32.2:5949/. 	28.1.2022 	19:11:17 	lx 	(5. Tcp Server 2)

--- server started in 0.0019 seconds, 2022-01-28 19:11:17, used memory 3000.3 kb --- 	 5. 	28.1.2022 	19:11:17 	lx 	(5. Tcp Server 2)

OSX arm64, using: rapidjson-arm, lfs-ffi. 	28.1.2022 	19:11:17 	lx 	(5. Tcp Server 2)

1. uri: HTTP, POST '/rest/nc/query/sql4d' 2022-01-28 19:11:21
'POST /rest/nc/query/sql4d HTTP/1.1
Content-Type: application/json
Connection: keep-alive
User-Agent: nc-rest-sql
Authorization: Basic ???
Content-Encoding: lz4
Accept-Encoding: lz4
Content-Length: 458
Content-Uncompressed-Length: 502

LZ4. 	28.1.2022 	19:11:21 	lx 	(5. Tcp Server 2)

* load upper level nc-preference file: '/Users/pasi/nc/nc-server/../nc-preference/.nc-env.json'. 	28.1.2022 	19:11:21 	lx 	(5. Tcp Server 2)

    Connected to: 'Manageri v12 plg4d local, , database: plg4d, user: manage_demo'. 	28.1.2022 	19:11:21 	lx 	(5. Tcp Server 2)

  database connect time: 0.0001 seconds. 	28.1.2022 	19:11:21 	lx 	(5. Tcp Server 2)

* connect: connection changed from 'postgre-demo/fi_demo' to 'plg4d/plg4d'. 	28.1.2022 	19:11:21 	lx 	(5. Tcp Server 2)

 1. answer time: 00:00:00.00075
  
SELECT COUNT(*)
 FROM sales_order_row sor
 WHERE sor.change_id > '20220128.171038.oy00h.sor_ zzy0ae544bd03e1d06'. 	28.1.2022 	19:11:21 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 704 bytes ***. 	28.1.2022 	19:12:34 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	19:12:34 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 701 bytes ***. 	28.1.2022 	19:14:35 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	19:14:35 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 695 bytes ***. 	28.1.2022 	19:19:02 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	19:19:02 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 698 bytes ***. 	28.1.2022 	19:19:39 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	19:19:39 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 700 bytes ***. 	28.1.2022 	19:19:56 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	19:19:56 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 605 bytes ***. 	28.1.2022 	19:20:10 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	19:20:10 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 693 bytes ***. 	28.1.2022 	19:22:08 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	19:22:08 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 693 bytes ***. 	28.1.2022 	19:22:32 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	19:22:32 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 688 bytes ***. 	28.1.2022 	19:23:33 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	19:23:33 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 657 bytes ***. 	28.1.2022 	19:29:11 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	19:29:11 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 595 bytes ***. 	28.1.2022 	19:29:32 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	19:29:32 	lx 	(5. Tcp Server 2)

Record is not loaded for table: Sales Order Row ([Sales Order Row]Product id). 	28.1.2022 	19:29:41 	_fld VALUE 	(6. tbl_ 5)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 656 bytes ***. 	28.1.2022 	19:31:06 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	19:31:06 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 2 779 bytes ***. 	28.1.2022 	19:31:33 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	19:31:33 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 596 bytes ***. 	28.1.2022 	19:33:21 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	19:33:21 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 663 bytes ***. 	28.1.2022 	19:41:19 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	19:41:19 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 608 bytes ***. 	28.1.2022 	19:41:48 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	19:41:48 	lx 	(5. Tcp Server 2)

Check work order. Sales order or sales order row -field values might be wrong: 000003/01. 	28.1.2022 	19:42:21 	ld_ProductionLotDeliveryDate 	(9. Product State Calculation)

Check work order. Sales order or sales order row -field values might be wrong: 000003/01. 	28.1.2022 	19:42:22 	ld_ProductionLotDeliveryDate 	(9. Product State Calculation)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 729 bytes ***. 	28.1.2022 	19:45:20 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	19:45:20 	lx 	(5. Tcp Server 2)

Record is not loaded for table: Sales Order Row ([Sales Order Row]Product id). 	28.1.2022 	19:45:33 	_fld VALUE 	(6. tbl_ 5)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 2 803 bytes ***. 	28.1.2022 	19:45:45 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	19:45:45 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 730 bytes ***. 	28.1.2022 	19:46:27 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	19:46:27 	lx 	(5. Tcp Server 2)

Record is not loaded for table: Sales Order Row ([Sales Order Row]Product id). 	28.1.2022 	19:46:41 	_fld VALUE 	(6. tbl_ 5)

Check work order. Sales order or sales order row -field values might be wrong: 000003/01. 	28.1.2022 	19:46:44 	ld_ProductionLotDeliveryDate 	(9. Product State Calculation)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 2 827 bytes ***. 	28.1.2022 	19:46:52 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	19:46:52 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 2 808 bytes ***. 	28.1.2022 	19:48:00 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	19:48:00 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 666 bytes ***. 	28.1.2022 	19:49:46 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	19:49:46 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 601 bytes ***. 	28.1.2022 	19:49:52 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	19:49:52 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 665 bytes ***. 	28.1.2022 	19:51:33 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	19:51:33 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 2 780 bytes ***. 	28.1.2022 	19:52:08 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	19:52:08 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 3 354 bytes ***. 	28.1.2022 	19:53:02 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	19:53:02 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 3 330 bytes ***. 	28.1.2022 	20:00:04 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	20:00:04 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 3 367 bytes ***. 	28.1.2022 	20:01:26 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	20:01:26 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 664 bytes ***. 	28.1.2022 	20:06:27 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	20:06:27 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 604 bytes ***. 	28.1.2022 	20:06:34 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	20:06:34 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 3 400 bytes ***. 	28.1.2022 	20:08:49 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	20:08:49 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 3 423 bytes ***. 	28.1.2022 	20:10:35 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	20:10:35 	lx 	(5. Tcp Server 2)

*** tcp close for sock 92, type 'nil', protocol 'HTTP', reason: 'POLLHUP', request length: 2 836 bytes ***. 	28.1.2022 	20:15:37 	lx 	(5. Tcp Server 2)

closing socket '92'. 	28.1.2022 	20:15:37 	lx 	(5. Tcp Server 2)

Starting to stop tcp server 2, max. delay 1,7 seconds... 	28.1.2022 	20:16:36 	_lx_SERVER 	(6. tbl_ 8)

*** tcp close for sock 90, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	20:16:36 	lx 	(5. Tcp Server 2)

closing socket '90'. 	28.1.2022 	20:16:36 	lx 	(5. Tcp Server 2)

*** tcp close for sock 91, type 'nil', protocol 'nil', reason: '', request length: (no request) bytes ***. 	28.1.2022 	20:16:36 	lx 	(5. Tcp Server 2)

closing socket '91'. 	28.1.2022 	20:16:36 	lx 	(5. Tcp Server 2)

 -- Server statistics --
answerCount:          259
poll.fd_count:        0
pollCount:            168288
pollInCount:          292
pollOutCount:         0
pollCloseCount:       33
pollErrCount:         0
fd add/remove count:  35/35
totalBytesReceived:   255774
totalBytesSent:       139383. 	28.1.2022 	20:16:36 	lx 	(5. Tcp Server 2)

--- server stopped ---. 	28.1.2022 	20:16:36 	lx 	(5. Tcp Server 2)

finalizer: free p1 	 cdata<void *>: 0x012457e9c0. 	28.1.2022 	20:16:36 	lx 	(5. Tcp Server 2)

Tcp server 2 stopped. 	28.1.2022 	20:16:36 	_lx_SERVER 	(5. Tcp Server 2)

